diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-27 22:30:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-27 22:30:01 +0000 |
commit | 970c414c9386f5e5d419f13819ae037f7cdefa83 (patch) | |
tree | d9e872e56efb1dcacc3d1ed5c112ef02952a7cb2 /usr.sbin/lpr/common_source | |
parent | cbca239aab777234ffcec8a3e50d8f2cb0460be7 (diff) |
merge if() and foo = snprintf checks better; millert ok
Diffstat (limited to 'usr.sbin/lpr/common_source')
-rw-r--r-- | usr.sbin/lpr/common_source/startdaemon.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/lpr/common_source/startdaemon.c b/usr.sbin/lpr/common_source/startdaemon.c index cf4e868cf17..230345a2055 100644 --- a/usr.sbin/lpr/common_source/startdaemon.c +++ b/usr.sbin/lpr/common_source/startdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: startdaemon.c,v 1.8 2002/06/08 01:53:43 millert Exp $ */ +/* $OpenBSD: startdaemon.c,v 1.9 2002/07/27 22:30:00 deraadt Exp $ */ /* $NetBSD: startdaemon.c,v 1.10 1998/07/18 05:04:39 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static const char sccsid[] = "@(#)startdaemon.c 8.2 (Berkeley) 4/17/94"; #else -static const char rcsid[] = "$OpenBSD: startdaemon.c,v 1.8 2002/06/08 01:53:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: startdaemon.c,v 1.9 2002/07/27 22:30:00 deraadt Exp $"; #endif #endif /* not lint */ @@ -96,8 +96,8 @@ startdaemon(char *printer) } PRIV_END; siginterrupt(SIGINT, 0); - n = snprintf(buf, sizeof(buf), "\1%s\n", printer); - if (n >= sizeof(buf) || n == -1) { + if ((n = snprintf(buf, sizeof(buf), "\1%s\n", printer)) >= sizeof(buf) || + n == -1) { close(s); return (0); } |