summaryrefslogtreecommitdiffstats
path: root/bin/pax/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pax/cache.c')
-rw-r--r--bin/pax/cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/pax/cache.c b/bin/pax/cache.c
index 040e18b..f593dce 100644
--- a/bin/pax/cache.c
+++ b/bin/pax/cache.c
@@ -388,7 +388,8 @@ uid_name(name, uid)
}
if (ptr == NULL)
- ptr = (UIDC *)malloc(sizeof(UIDC));
+ ptr = usrtb[st_hash(name, namelen, UNM_SZ)] =
+ (UIDC *)malloc(sizeof(UIDC));
/*
* no match, look it up, if no match store it as an invalid entry,
@@ -457,7 +458,8 @@ gid_name(name, gid)
++gropn;
}
if (ptr == NULL)
- ptr = (GIDC *)malloc(sizeof(GIDC));
+ ptr = grptb[st_hash(name, namelen, GID_SZ)] =
+ (GIDC *)malloc(sizeof(GIDC));
/*
* no match, look it up, if no match store it as an invalid entry,
OpenPOWER on IntegriCloud