Prechádzať zdrojové kódy

r12790@catbus: nickm | 2007-05-18 17:24:26 -0400
Fix build on gcc 4.2


svn:r10212

Nick Mathewson 17 rokov pred
rodič
commit
7a61357250
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      src/common/ht.h

+ 2 - 1
src/common/ht.h

@@ -122,8 +122,9 @@ ht_string_hash(const char *s)
   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  \