]> Dogcows Code - chaz/tar/blobdiff - src/names.c
Adjust to new hash API.
[chaz/tar] / src / names.c
index c4c94de0445f53f7110eef217362dfdcb2f1a999..f86582d7ebbc8fb93a33275e3a2a2da36aedc1a7 100644 (file)
@@ -66,7 +66,7 @@ uid_to_uname (uid_t uid, char **uname)
 
   if (uid != 0 && uid == cached_no_such_uid)
     {
-      *uname = strdup ("");
+      *uname = xstrdup ("");
       return;
     }
 
@@ -81,11 +81,11 @@ uid_to_uname (uid_t uid, char **uname)
       else
        {
          cached_no_such_uid = uid;
-         *uname = strdup ("");
+         *uname = xstrdup ("");
          return;
        }
     }
-  *uname = strdup (cached_uname);
+  *uname = xstrdup (cached_uname);
 }
 
 /* Given GID, find the corresponding GNAME.  */
@@ -96,7 +96,7 @@ gid_to_gname (gid_t gid, char **gname)
 
   if (gid != 0 && gid == cached_no_such_gid)
     {
-      *gname = strdup ("");
+      *gname = xstrdup ("");
       return;
     }
 
@@ -111,11 +111,11 @@ gid_to_gname (gid_t gid, char **gname)
       else
        {
          cached_no_such_gid = gid;
-         *gname = strdup ("");
+         *gname = xstrdup ("");
          return;
        }
     }
-  *gname = strdup (cached_gname);
+  *gname = xstrdup (cached_gname);
 }
 
 /* Given UNAME, set the corresponding UID and return 1, or else, return 0.  */
@@ -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);
 }
This page took 0.024329 seconds and 4 git commands to generate.