[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10212: Fix build on gcc 4.2 (in tor/trunk: . src/common)



Author: nickm
Date: 2007-05-18 17:24:37 -0400 (Fri, 18 May 2007)
New Revision: 10212

Modified:
   tor/trunk/
   tor/trunk/src/common/ht.h
Log:
 r12790@catbus:  nickm | 2007-05-18 17:24:26 -0400
 Fix build on gcc 4.2



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r12790] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/ht.h
===================================================================
--- tor/trunk/src/common/ht.h	2007-05-18 21:19:58 UTC (rev 10211)
+++ tor/trunk/src/common/ht.h	2007-05-18 21:24:37 UTC (rev 10212)
@@ -122,8 +122,9 @@
   name##_HT_FIND(const struct name *head, struct type *elm)             \
   {                                                                     \
     struct type **p;                                                    \
+    struct name *h = (struct name *) head;                              \
     _HT_SET_HASH(elm, field, hashfn);                                   \
-    p = _##name##_HT_FIND_P((struct name *)head, elm);                  \
+    p = _##name##_HT_FIND_P(h, elm);                                    \
     return p ? *p : NULL;                                               \
   }                                                                     \
   /* Insert the element 'elm' into the table 'head'.  Do not call this  \