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.sbin/iscsid | |
parent | aef6c060ee15355c0490999de3c4679d7bb97e84 (diff) |
snprintf/vsnprintf return < 0 on error, rather than -1.
Diffstat (limited to 'usr.sbin/iscsid')
-rw-r--r-- | usr.sbin/iscsid/pdu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/iscsid/pdu.c b/usr.sbin/iscsid/pdu.c index d498882d67c..37e2f81d543 100644 --- a/usr.sbin/iscsid/pdu.c +++ b/usr.sbin/iscsid/pdu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdu.c,v 1.11 2015/12/05 06:38:18 mmcc Exp $ */ +/* $OpenBSD: pdu.c,v 1.12 2019/07/03 03:24:03 deraadt Exp $ */ /* * Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org> @@ -75,7 +75,7 @@ text_to_pdu(struct kvp *k, struct pdu *p) nk = 0; while(k[nk].key) { n = snprintf(s, rem, "%s=%s", k[nk].key, k[nk].value); - if (n == -1 || (size_t)n >= rem) + if (n < 0 || (size_t)n >= rem) fatalx("text_to_pdu"); rem -= n + 1; s += n + 1; |