diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2020-11-29 20:04:37 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2020-11-29 20:04:37 +0000 |
commit | 80e0d21d844f9e8a41701af21ae213f210ef0043 (patch) | |
tree | 138dd521164d9257bd52a7b15e102055fd045700 /usr.sbin | |
parent | cb9860db5188d28b9299e555c4ada9747d132a90 (diff) |
Silence -Wsign-compare whining in bsnprintf()
This warning was present since an incorrect cast was removed in r1.11.
Add the cast to the correct place, i.e., cast to the wider type.
ok florian martijn
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldapd/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldapd/util.c b/usr.sbin/ldapd/util.c index 3f5d74d0a3c..02cde7f9586 100644 --- a/usr.sbin/ldapd/util.c +++ b/usr.sbin/ldapd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.12 2019/10/24 12:39:26 tb Exp $ */ +/* $OpenBSD: util.c,v 1.13 2020/11/29 20:04:36 tb Exp $ */ /* * Copyright (c) 2009 Martin Hedenfalk <martin@bzero.se> @@ -43,7 +43,7 @@ bsnprintf(char *str, size_t size, const char *format, ...) va_start(ap, format); ret = vsnprintf(str, size, format, ap); va_end(ap); - if (ret < 0 || ret >= size) + if (ret < 0 || (size_t)ret >= size) return 0; return 1; |