diff options
author | deraadt <deraadt@openbsd.org> | 2019-07-03 03:24:01 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2019-07-03 03:24:01 +0000 |
commit | 515e489c3d599b9cfcdf9cf6842ac49f92e154d6 (patch) | |
tree | 9ce211473951e1baf5c99e08c2c35012292670f1 /usr.sbin/lpd | |
parent | sync (diff) | |
download | wireguard-openbsd-515e489c3d599b9cfcdf9cf6842ac49f92e154d6.tar.xz wireguard-openbsd-515e489c3d599b9cfcdf9cf6842ac49f92e154d6.zip |
snprintf/vsnprintf return < 0 on error, rather than -1.
Diffstat (limited to 'usr.sbin/lpd')
-rw-r--r-- | usr.sbin/lpd/printer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/lpd/printer.c b/usr.sbin/lpd/printer.c index ff4b0cf3d1d..b6743f2a9c7 100644 --- a/usr.sbin/lpd/printer.c +++ b/usr.sbin/lpd/printer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printer.c,v 1.1.1.1 2018/04/27 16:14:37 eric Exp $ */ +/* $OpenBSD: printer.c,v 1.2 2019/07/03 03:24:03 deraadt Exp $ */ /* * Copyright (c) 2017 Eric Faurot <eric@openbsd.org> @@ -848,7 +848,7 @@ sendcmd(const char *fmt, ...) len = vsnprintf(line, sizeof(line), fmt, ap); va_end(ap); - if (len == -1) { + if (len < 0) { log_warn("%s: vsnprintf", __func__); return -1; } |