Jelajahi Sumber

Adjust to new hash API.

Paul Eggert 20 tahun lalu
induk
melakukan
9b7c6df82b
3 mengubah file dengan 11 tambahan dan 11 penghapusan
  1. 2 2
      src/create.c
  2. 4 4
      src/incremen.c
  3. 5 5
      src/names.c

+ 2 - 2
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;

+ 4 - 4
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)

+ 5 - 5
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);
 }