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/doas | |
parent | aef6c060ee15355c0490999de3c4679d7bb97e84 (diff) |
snprintf/vsnprintf return < 0 on error, rather than -1.
Diffstat (limited to 'usr.bin/doas')
-rw-r--r-- | usr.bin/doas/doas.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/doas/doas.c b/usr.bin/doas/doas.c index c52d09cbcda..af57f429908 100644 --- a/usr.bin/doas/doas.c +++ b/usr.bin/doas/doas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: doas.c,v 1.79 2019/06/29 22:35:37 tedu Exp $ */ +/* $OpenBSD: doas.c,v 1.80 2019/07/03 03:24:02 deraadt Exp $ */ /* * Copyright (c) 2015 Ted Unangst <tedu@openbsd.org> * @@ -267,7 +267,7 @@ unveilcommands(const char *ipath, const char *cmd) if (cp) { int r = snprintf(buf, sizeof buf, "%s/%s", cp, cmd); - if (r != -1 && r < sizeof buf) { + if (r >= 0 && r < sizeof buf) { if (unveil(buf, "x") != -1) unveils++; } |