summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldapd
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2019-07-03 03:24:01 +0000
committerderaadt <deraadt@openbsd.org>2019-07-03 03:24:01 +0000
commit515e489c3d599b9cfcdf9cf6842ac49f92e154d6 (patch)
tree9ce211473951e1baf5c99e08c2c35012292670f1 /usr.sbin/ldapd
parentsync (diff)
downloadwireguard-openbsd-515e489c3d599b9cfcdf9cf6842ac49f92e154d6.tar.xz
wireguard-openbsd-515e489c3d599b9cfcdf9cf6842ac49f92e154d6.zip
snprintf/vsnprintf return < 0 on error, rather than -1.
Diffstat (limited to 'usr.sbin/ldapd')
-rw-r--r--usr.sbin/ldapd/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldapd/util.c b/usr.sbin/ldapd/util.c
index eb72d949dcb..cc94ebf74d2 100644
--- a/usr.sbin/ldapd/util.c
+++ b/usr.sbin/ldapd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.10 2018/05/15 11:19:21 reyk Exp $ */
+/* $OpenBSD: util.c,v 1.11 2019/07/03 03:24:03 deraadt 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 == -1 || ret >= (int)size)
+ if (ret < 0 || ret >= size)
return 0;
return 1;