]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler warning (HPUX/11i)
authorMark Andrews <marka@isc.org>
Thu, 24 Jul 2003 06:41:20 +0000 (06:41 +0000)
committerMark Andrews <marka@isc.org>
Thu, 24 Jul 2003 06:41:20 +0000 (06:41 +0000)
lib/isc/include/isc/refcount.h

index 265ed8cead7df2ec2b1f39095764ffb762e4c546..1b4e08ad82a9ba1bd790b5cd79c5073d7b47744e 100644 (file)
@@ -15,7 +15,7 @@
  * 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
 #define ISC_REFCOUNT_H 1
@@ -111,21 +111,23 @@ typedef struct isc_refcount {
 
 #define isc_refcount_increment(rp, tp)                         \
        do {                                                    \
+               unsigned int _tmp = (unsigned int *)(tp);       \
                LOCK(&(rp)->lock);                              \
                REQUIRE((rp)->refs > 0);                        \
                ++((rp)->refs);                                 \
-               if ((tp) != NULL)                               \
-                       *(unsigned int *)(tp) = ((rp)->refs);   \
+               if (_tmp != NULL)                               \
+                       *_tmp = ((rp)->refs);                   \
                UNLOCK(&(rp)->lock);                            \
        } while (0)
 
 #define isc_refcount_decrement(rp, tp)                         \
        do {                                                    \
+               unsigned int _tmp = (unsigned int *)(tp);       \
                LOCK(&(rp)->lock);                              \
                REQUIRE((rp)->refs > 0);                        \
                --((rp)->refs);                                 \
-               if ((tp) != NULL)                               \
-                       *(unsigned int *)(tp) = ((rp)->refs);   \
+               if (_tmp != NULL)                               \
+                       *_tmp = ((rp)->refs);                   \
                UNLOCK(&(rp)->lock);                            \
        } while (0)