]> andersk Git - splint.git/blobdiff - src/genericTable.c
Fixes for win32
[splint.git] / src / genericTable.c
index 5e1b2a3de09869a92fd6bc43ab1dccc1bf7c3abb..75067f628ef724a2474bd358fdfa0946abbc72e8 100644 (file)
@@ -140,19 +140,22 @@ static /*@null@*/ /*@exposed@*/ void *ghbucket_lookup (ghbucket p_h, cstring p_k
 static void
 ghbucket_add (/*@notnull@*/ ghbucket h, /*@only@*/ ghentry e)
 {
-    void *exloc = ghbucket_lookup (h, e->key);
-    
-    if (exloc != NULL) {
-      llassert (FALSE);
-    }
-
-    if (h->nspace == 0) {
-       ghbucket_grow (h);
-    }
-    
-    h->entries[h->size] = e;
-    h->size++;
-    h->nspace--;
+  void *exloc = ghbucket_lookup (h, e->key);
+  
+  if (exloc != NULL) {
+    llcontbug (message ("ghbucket_add: adding duplicate entry: %s",
+                       e->key));
+    ghentry_free (e);
+    return;
+  }
+  
+  if (h->nspace == 0) {
+    ghbucket_grow (h);
+  }
+  
+  h->entries[h->size] = e;
+  h->size++;
+  h->nspace--;
 }
 
 static int
This page took 0.042915 seconds and 4 git commands to generate.