X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/268f6af4353edcf0bdbb1b50e4667e54c9cb6bd3..7481fc9c5a603e35a6972c0be07d18d507e5dd50:/file.c diff --git a/file.c b/file.c index 005080c..5a97064 100644 --- a/file.c +++ b/file.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: file.c,v 1.2 1999/10/22 22:47:13 mdw Exp $ + * $Id: file.c,v 1.7 2004/04/08 01:36:25 mdw Exp $ * * File source and target * @@ -26,17 +26,6 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: file.c,v $ - * Revision 1.2 1999/10/22 22:47:13 mdw - * New (empty) endpoint method required. - * - * Revision 1.1 1999/07/26 23:33:32 mdw - * New sources and targets. - * - */ - /*----- Header files ------------------------------------------------------*/ #include "config.h" @@ -438,7 +427,7 @@ static endpt *file_endpt(fdata *f, const char *desc) if (fd != -1) { if (fattr_apply(f->out.u.name, &f->fa)) { - fw_log(-1, "[%s] couldn't apply file attributes: %s", + fw_log(-1, "[%s] couldn't apply file attributes to `%s': %s", desc, f->out.u.name, strerror(errno)); } } else if ((fd = open(f->out.u.name, m & ~O_CREAT)) < 0) { @@ -471,9 +460,9 @@ static endpt *file_endpt(fdata *f, const char *desc) static void file_destroy(fdata *f) { if (f->in.type == FTYPE_NAME) - free(f->in.u.name); + xfree(f->in.u.name); if (f->out.type == FTYPE_NAME) - free(f->out.u.name); + xfree(f->out.u.name); } /*----- File source description -------------------------------------------*/ @@ -543,8 +532,7 @@ tidy: static void fsource_destroy(source *s) { fsource *fs = (fsource *)s; - - /* free(fs->s.desc); */ + xfree(fs->s.desc); file_destroy(&fs->f); DESTROY(fs); } @@ -599,7 +587,7 @@ static void ftarget_destroy(target *t) { ftarget *ft = (ftarget *)t; file_destroy(&ft->f); - /* free(ft->t.desc); */ + xfree(ft->t.desc); DESTROY(ft); } @@ -607,7 +595,7 @@ static void ftarget_destroy(target *t) target_ops ftarget_ops = { "file", - ftarget_option, ftarget_read, ftarget_create, ftarget_destroy + ftarget_option, ftarget_read, 0, ftarget_create, ftarget_destroy }; /*----- That's all, folks -------------------------------------------------*/