summaryrefslogtreecommitdiff
path: root/libbb/procps.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/procps.c')
-rw-r--r--libbb/procps.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libbb/procps.c b/libbb/procps.c
index fb4c320..5833a1f 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -12,13 +12,13 @@
#include "libbb.h"
-typedef struct unsigned_to_name_map_t {
- long id;
+typedef struct id_to_name_map_t {
+ uid_t id;
char name[USERNAME_MAX_SIZE];
-} unsigned_to_name_map_t;
+} id_to_name_map_t;
typedef struct cache_t {
- unsigned_to_name_map_t *cache;
+ id_to_name_map_t *cache;
int size;
} cache_t;
@@ -39,7 +39,7 @@ void FAST_FUNC clear_username_cache(void)
#if 0 /* more generic, but we don't need that yet */
/* Returns -N-1 if not found. */
/* cp->cache[N] is allocated and must be filled in this case */
-static int get_cached(cache_t *cp, unsigned id)
+static int get_cached(cache_t *cp, uid_t id)
{
int i;
for (i = 0; i < cp->size; i++)
@@ -52,8 +52,8 @@ static int get_cached(cache_t *cp, unsigned id)
}
#endif
-static char* get_cached(cache_t *cp, long id,
- char* FAST_FUNC x2x_utoa(long id))
+static char* get_cached(cache_t *cp, uid_t id,
+ char* FAST_FUNC x2x_utoa(uid_t id))
{
int i;
for (i = 0; i < cp->size; i++)