summaryrefslogtreecommitdiff
path: root/usr.bin/cdio/cdio.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-07-03 03:24:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-07-03 03:24:05 +0000
commit75fca2aa3a35362ecff27f0c3041d3f511b51275 (patch)
treed0c647e96313c8d94edf3f50304b78ae1cf249c1 /usr.bin/cdio/cdio.c
parentaef6c060ee15355c0490999de3c4679d7bb97e84 (diff)
snprintf/vsnprintf return < 0 on error, rather than -1.
Diffstat (limited to 'usr.bin/cdio/cdio.c')
-rw-r--r--usr.bin/cdio/cdio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cdio/cdio.c b/usr.bin/cdio/cdio.c
index 023529d3f70..af5a26c16a0 100644
--- a/usr.bin/cdio/cdio.c
+++ b/usr.bin/cdio/cdio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdio.c,v 1.77 2019/06/28 13:35:00 deraadt Exp $ */
+/* $OpenBSD: cdio.c,v 1.78 2019/07/03 03:24:02 deraadt Exp $ */
/* Copyright (c) 1995 Serge V. Vakulenko
* All rights reserved.
@@ -285,7 +285,7 @@ main(int argc, char **argv)
len = snprintf(p, buf + sizeof buf - p,
"%s%s", (p > buf) ? " " : "", *argv);
- if (len == -1 || len >= buf + sizeof buf - p)
+ if (len < 0 || len >= buf + sizeof buf - p)
errx(1, "argument list too long.");
p += len;