diff options
author | 2002-07-27 22:30:00 +0000 | |
---|---|---|
committer | 2002-07-27 22:30:00 +0000 | |
commit | 459a97b21a487735a83300adf12b895382173d71 (patch) | |
tree | 450002dead40c64ad46f4cc60ce511ee02351dc7 /usr.sbin/lpr/common_source/startdaemon.c | |
parent | Fix PIXEL_SHIFT value for 4bit displays. (diff) | |
download | wireguard-openbsd-459a97b21a487735a83300adf12b895382173d71.tar.xz wireguard-openbsd-459a97b21a487735a83300adf12b895382173d71.zip |
merge if() and foo = snprintf checks better; millert ok
Diffstat (limited to 'usr.sbin/lpr/common_source/startdaemon.c')
-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); } |