From 9b7c6df82bf95ade05148c59441e2e189515a11f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 2 May 2005 08:02:09 +0000 Subject: [PATCH] Adjust to new hash API. --- src/create.c | 4 ++-- src/incremen.c | 8 ++++---- src/names.c | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/create.c b/src/create.c index 505dca3..d8f0c76 100644 --- a/src/create.c +++ b/src/create.c @@ -1211,8 +1211,8 @@ create_archive (void) /* Calculate the hash of a link. */ -static unsigned -hash_link (void const *entry, unsigned n_buckets) +static size_t +hash_link (void const *entry, size_t n_buckets) { struct link const *l = entry; uintmax_t num = l->dev ^ l->ino; diff --git a/src/incremen.c b/src/incremen.c index 2c2dee9..6fb6e31 100644 --- a/src/incremen.c +++ b/src/incremen.c @@ -50,8 +50,8 @@ static Hash_table *directory_table; #endif /* Calculate the hash of a directory. */ -static unsigned -hash_directory (void const *entry, unsigned n_buckets) +static size_t +hash_directory (void const *entry, size_t n_buckets) { struct directory const *directory = entry; return hash_string (directory->name, n_buckets); @@ -520,7 +520,7 @@ purge_directory (char const *directory_name) stat_diag (p); WARN((0, 0, _("%s: Not purging directory: unable to stat"), quotearg_colon (p))); - continue; + continue; } else if (one_file_system_option && st.st_dev != root_device) { @@ -529,7 +529,7 @@ purge_directory (char const *directory_name) quotearg_colon (p))); continue; } - + if (! interactive_option || confirm ("delete", p)) { if (verbose_option) diff --git a/src/names.c b/src/names.c index 5f3b18b..f86582d 100644 --- a/src/names.c +++ b/src/names.c @@ -266,20 +266,20 @@ name_next (int change_dirs) if (name_buffer_length < source_len) { do - { + { name_buffer_length *= 2; if (! name_buffer_length) xalloc_die (); } while (name_buffer_length < source_len); - + free (name_buffer); name_buffer = xmalloc (name_buffer_length + 2); } strcpy (name_buffer, source); /* Zap trailing slashes. */ - + cursor = name_buffer + strlen (name_buffer) - 1; while (cursor > name_buffer && ISSLASH (*cursor)) *cursor-- = '\0'; @@ -867,8 +867,8 @@ excluded_name (char const *name) /* Hash tables of strings. */ /* Calculate the hash of a string. */ -static unsigned -hash_string_hasher (void const *name, unsigned n_buckets) +static size_t +hash_string_hasher (void const *name, size_t n_buckets) { return hash_string (name, n_buckets); } -- 2.44.0