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

nickm at seul.org nickm at seul.org
Fri May 18 21:24:38 UTC 2007


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 at 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  \



More information about the tor-commits mailing list