Browse code

bb11161 - fix return code test that resulted in writing to uninitialized hashset.

Steven Morgan authored on 2014/11/04 06:25:23
Showing 1 changed files
... ...
@@ -776,7 +776,7 @@ static int cli_hashset_grow(struct cli_hashset *hs)
776 776
 		rc = cli_hashset_init_pool(&new_hs, hs->capacity << 1, hs->limit*100/hs->capacity, hs->mempool);
777 777
 	else
778 778
 		rc = cli_hashset_init(&new_hs, hs->capacity << 1, hs->limit*100/hs->capacity);
779
-	if(rc < 0)
779
+	if(rc != 0)
780 780
 		return rc;
781 781
 	/* and copy keys */
782 782
 	for(i=0;i < hs->capacity;i++) {