From: Jim Meyering Date: Thu, 1 Nov 2001 15:55:53 +0000 (+0000) Subject: (hash_print) [TESTING]: Clean up. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=623af67cdd2b24da1bdc090c5c3892ba3f9b152e;p=pspp (hash_print) [TESTING]: Clean up. --- diff --git a/lib/hash.c b/lib/hash.c index a94a5495a1..8ba1344c94 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -995,13 +995,14 @@ hash_print (const Hash_table *table) struct hash_entry *cursor; if (bucket) - printf ("%d:\n", slot); + printf ("%d:\n", bucket - table->bucket); for (cursor = bucket; cursor; cursor = cursor->next) { char *s = (char *) cursor->data; /* FIXME */ - printf (" %s\n", s); + if (s) + printf (" %s\n", s); } } }