diff options
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; |