]> andersk Git - moira.git/blobdiff - lib/hash.c
POSIX, ANSI, sanity fixes
[moira.git] / lib / hash.c
index 2a41cd2e826fe1f964967767a92bda0820b8ad43..665925d4077759ed2b0db156b14c7714b8c6724f 100644 (file)
 #include <mit-copyright.h>
 #include <ctype.h>
 #include <moira.h>
+#include <string.h>
+#include <stdlib.h>
 
+#ifndef NULL
 #define NULL 0
+#endif
 #define hash_func(h, key) (key >= 0 ? (key % h->size) : (-key % h->size))
 
 /* Create a hash table.  The size is just a hint, not a maximum. */
@@ -30,7 +34,7 @@ int size;
        free(h);
        return((struct hash *) NULL);
     }
-    bzero(h->data, size * sizeof(char *));
+    memset(h->data, 0, size * sizeof(char *));
     return(h);
 }
 
This page took 0.056528 seconds and 4 git commands to generate.