diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2009-09-10 13:03:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2009-09-10 13:03:36 +0000 |
commit | bec7607b1854093227be1a6495f803647194e564 (patch) | |
tree | 2af5696ea07dda86bf718c07f8896ff11b0fded5 /usr.bin/newsyslog | |
parent | 1acfdbc08e4ca000d9544f71d6058da7749f4ec1 (diff) |
Correct error message when fclose() fails. From Brian Poole.
Diffstat (limited to 'usr.bin/newsyslog')
-rw-r--r-- | usr.bin/newsyslog/newsyslog.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c index 64f3f848595..cc8f9089ce9 100644 --- a/usr.bin/newsyslog/newsyslog.c +++ b/usr.bin/newsyslog/newsyslog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newsyslog.c,v 1.84 2007/03/20 03:50:39 tedu Exp $ */ +/* $OpenBSD: newsyslog.c,v 1.85 2009/09/10 13:03:35 millert Exp $ */ /* * Copyright (c) 1999, 2002, 2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -72,7 +72,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: newsyslog.c,v 1.84 2007/03/20 03:50:39 tedu Exp $"; +static const char rcsid[] = "$OpenBSD: newsyslog.c,v 1.85 2009/09/10 13:03:35 millert Exp $"; #endif /* not lint */ #ifndef CONF @@ -1333,7 +1333,7 @@ parseDWM(char *s) } /* - * Move a file using rename(2) is possible and copying if not. + * Move a file using rename(2) if possible and copying if not. */ int movefile(char *from, char *to, uid_t owner_uid, gid_t group_gid, mode_t perm) @@ -1369,9 +1369,9 @@ movefile(char *from, char *to, uid_t owner_uid, gid_t group_gid, mode_t perm) if (ferror(src)) err(1, "error reading from %s", from); if ((fclose(src)) != 0) - err(1, "can't fclose %s", to); - if ((fclose(dst)) != 0) err(1, "can't fclose %s", from); + if ((fclose(dst)) != 0) + err(1, "can't fclose %s", to); if ((unlink(from)) != 0) err(1, "can't unlink %s", from); |