mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
silence compiler warning (HPUX/11i)
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: refcount.h,v 1.3 2001/02/09 00:26:20 gson Exp $ */
|
/* $Id: refcount.h,v 1.4 2003/07/24 06:41:20 marka Exp $ */
|
||||||
|
|
||||||
#ifndef ISC_REFCOUNT_H
|
#ifndef ISC_REFCOUNT_H
|
||||||
#define ISC_REFCOUNT_H 1
|
#define ISC_REFCOUNT_H 1
|
||||||
@@ -111,21 +111,23 @@ typedef struct isc_refcount {
|
|||||||
|
|
||||||
#define isc_refcount_increment(rp, tp) \
|
#define isc_refcount_increment(rp, tp) \
|
||||||
do { \
|
do { \
|
||||||
|
unsigned int _tmp = (unsigned int *)(tp); \
|
||||||
LOCK(&(rp)->lock); \
|
LOCK(&(rp)->lock); \
|
||||||
REQUIRE((rp)->refs > 0); \
|
REQUIRE((rp)->refs > 0); \
|
||||||
++((rp)->refs); \
|
++((rp)->refs); \
|
||||||
if ((tp) != NULL) \
|
if (_tmp != NULL) \
|
||||||
*(unsigned int *)(tp) = ((rp)->refs); \
|
*_tmp = ((rp)->refs); \
|
||||||
UNLOCK(&(rp)->lock); \
|
UNLOCK(&(rp)->lock); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define isc_refcount_decrement(rp, tp) \
|
#define isc_refcount_decrement(rp, tp) \
|
||||||
do { \
|
do { \
|
||||||
|
unsigned int _tmp = (unsigned int *)(tp); \
|
||||||
LOCK(&(rp)->lock); \
|
LOCK(&(rp)->lock); \
|
||||||
REQUIRE((rp)->refs > 0); \
|
REQUIRE((rp)->refs > 0); \
|
||||||
--((rp)->refs); \
|
--((rp)->refs); \
|
||||||
if ((tp) != NULL) \
|
if (_tmp != NULL) \
|
||||||
*(unsigned int *)(tp) = ((rp)->refs); \
|
*_tmp = ((rp)->refs); \
|
||||||
UNLOCK(&(rp)->lock); \
|
UNLOCK(&(rp)->lock); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user