summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Jodeit <moritz@cvs.openbsd.org>2006-02-12 15:51:37 +0000
committerMoritz Jodeit <moritz@cvs.openbsd.org>2006-02-12 15:51:37 +0000
commit2e80881019a59ae02d775049f3918e8eac1edd80 (patch)
tree59229f22def3cddff5fdf817903c7e34208f0f02
parentb9bf1fe59ceaee9cfb772a5961706dc2e1733f03 (diff)
Fix mail notification for rdist(1) as reported in user/5009. ok otto@
-rw-r--r--usr.bin/rdist/docmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/rdist/docmd.c b/usr.bin/rdist/docmd.c
index cbb86413c45..3df40a08443 100644
--- a/usr.bin/rdist/docmd.c
+++ b/usr.bin/rdist/docmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: docmd.c,v 1.17 2003/06/03 02:56:14 millert Exp $ */
+/* $OpenBSD: docmd.c,v 1.18 2006/02/12 15:51:36 moritz Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -37,7 +37,7 @@ static char RCSid[] __attribute__((__unused__)) =
"$From: docmd.c,v 1.8 2001/03/12 18:42:23 kim Exp $";
#else
static char RCSid[] __attribute__((__unused__)) =
-"$OpenBSD: docmd.c,v 1.17 2003/06/03 02:56:14 millert Exp $";
+"$OpenBSD: docmd.c,v 1.18 2006/02/12 15:51:36 moritz Exp $";
#endif
static char sccsid[] __attribute__((__unused__)) =
@@ -194,7 +194,7 @@ notify(char *rhost, struct namelist *to, time_t lmod)
(void) putc('\n', pf);
(void) fprintf(pf, "Options: %s\n\n", getondistoptlist(options));
- while ((len = read(fd, buf, sizeof(buf))) != (size_t)-1)
+ while ((len = read(fd, buf, sizeof(buf))) > 0)
(void) fwrite(buf, 1, len, pf);
(void) pclose(pf);