summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2020-11-29 20:07:38 +0000
committertb <tb@openbsd.org>2020-11-29 20:07:38 +0000
commit96051a297ae94909fd9e13fdadf905259903cab1 (patch)
treea6882f58eb445f0bdba04f08788e0579fd4ce177
parentSilence -Wsign-compare whining in bsnprintf() (diff)
downloadwireguard-openbsd-96051a297ae94909fd9e13fdadf905259903cab1.tar.xz
wireguard-openbsd-96051a297ae94909fd9e13fdadf905259903cab1.zip
Sync bsnprintf() with ldapd/util.c r1.13
Pointed out by jmatthew and requested by florian.
-rw-r--r--usr.sbin/smtpd/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c
index fce97ee764e..91e93678f77 100644
--- a/usr.sbin/smtpd/util.c
+++ b/usr.sbin/smtpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.151 2020/02/24 23:54:28 millert Exp $ */
+/* $OpenBSD: util.c,v 1.152 2020/11/29 20:07:38 tb Exp $ */
/*
* Copyright (c) 2000,2001 Markus Friedl. All rights reserved.
@@ -176,7 +176,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 >= (int)size)
+ if (ret < 0 || (size_t)ret >= size)
return 0;
return 1;