summaryrefslogtreecommitdiff
path: root/lib/hash.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-11-01 15:55:53 +0000
committerJim Meyering <jim@meyering.net>2001-11-01 15:55:53 +0000
commit74b63f68dd857e3cf675371b6ef6ec30c2b14f5e (patch)
tree808c1656c9110ba13594ed0851bcdd7cf4571b25 /lib/hash.c
parent85431d93ed0a14f115cf0c82181f4c388f932093 (diff)
downloadcoreutils-74b63f68dd857e3cf675371b6ef6ec30c2b14f5e.tar.xz
(hash_print) [TESTING]: Clean up.
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/hash.c b/lib/hash.c
index a94a5495a..8ba1344c9 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);
}
}
}