diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-07-03 03:24:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-07-03 03:24:05 +0000 |
commit | 75fca2aa3a35362ecff27f0c3041d3f511b51275 (patch) | |
tree | d0c647e96313c8d94edf3f50304b78ae1cf249c1 /usr.bin/mg | |
parent | aef6c060ee15355c0490999de3c4679d7bb97e84 (diff) |
snprintf/vsnprintf return < 0 on error, rather than -1.
Diffstat (limited to 'usr.bin/mg')
-rw-r--r-- | usr.bin/mg/cscope.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/cscope.c b/usr.bin/mg/cscope.c index 72aaa64dadc..18042d30e54 100644 --- a/usr.bin/mg/cscope.c +++ b/usr.bin/mg/cscope.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cscope.c,v 1.17 2017/10/12 14:12:00 florian Exp $ */ +/* $OpenBSD: cscope.c,v 1.18 2019/07/03 03:24:02 deraadt Exp $ */ /* * This file is in the public domain. @@ -634,7 +634,7 @@ csexists(const char *cmd) dir[--dlen] = '\0'; /* strip trailing '/' */ len = snprintf(fname, sizeof(fname), "%s/%s", dir, cmd); - if (len == -1 || len >= sizeof(fname)) { + if (len < 0 || len >= sizeof(fname)) { dobeep(); ewprintf("path too long"); goto cleanup; |