summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bind/lib/isc/mutexblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bind/lib/isc/mutexblock.c')
-rw-r--r--usr.sbin/bind/lib/isc/mutexblock.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.sbin/bind/lib/isc/mutexblock.c b/usr.sbin/bind/lib/isc/mutexblock.c
index 7f69f0a6838..6e9df3d2c5b 100644
--- a/usr.sbin/bind/lib/isc/mutexblock.c
+++ b/usr.sbin/bind/lib/isc/mutexblock.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: mutexblock.c,v 1.16.18.2 2005/04/29 00:16:47 marka Exp $ */
+/* $Id: mutexblock.c,v 1.2 2019/12/16 16:16:26 deraadt Exp $ */
/*! \file */
@@ -32,10 +32,9 @@ isc_mutexblock_init(isc_mutex_t *block, unsigned int count) {
for (i = 0; i < count; i++) {
result = isc_mutex_init(&block[i]);
if (result != ISC_R_SUCCESS) {
- i--;
- while (i > 0) {
- DESTROYLOCK(&block[i]);
+ while (i > 0U) {
i--;
+ DESTROYLOCK(&block[i]);
}
return (result);
}