lwid = 3;
while (1) {
- while (*string && *string == ' ') string++;
+ while (*string == ' ') string++;
c = (char *)strchr(string, ' ');
if (c == 0) {
wwid = strlen(string);
h->size = size;
h->data = (struct bucket **) perm_malloc(size * sizeof(char *));
if (h->data == (struct bucket **) NULL) {
- free(h);
return((struct hash *) NULL);
}
memset(h->data, 0, size * sizeof(char *));
}
}
}
-
-
-/* Deallocate all of the memory associated with a table */
-
-hash_destroy(h)
-struct hash *h;
-{
- register struct bucket *b, **p, *b1;
-
- for (p = &(h->data[h->size - 1]); p >= h->data; p--) {
- for (b = *p; b; b = b1) {
- b1 = b->next;
- free(b);
- }
- }
-}