summaryrefslogtreecommitdiff
path: root/names.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-09-28 10:31:20 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-28 10:31:20 -0700
commit58908b2e4f63169f98d0f21d9289c3125b200df1 (patch)
treec2390faf5381470519ec2ca7251c704f9b00e7e2 /names.c
parent93aa80bfbd35d0ff27704a173ecba5d8463ff183 (diff)
downloadusbutils-58908b2e4f63169f98d0f21d9289c3125b200df1.tar.gz
names.c: fix up some compiler warnings
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'names.c')
-rw-r--r--names.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/names.c b/names.c
index 6955f6c..209c882 100644
--- a/names.c
+++ b/names.c
@@ -140,12 +140,13 @@ static struct genericstrtable *countrycodes[HASHSZ] = { NULL, };
/* ---------------------------------------------------------------------- */
-static const char *names_genericstrtable(struct genericstrtable *t[HASHSZ], unsigned int index)
+static const char *names_genericstrtable(struct genericstrtable *t[HASHSZ],
+ unsigned int idx)
{
struct genericstrtable *h;
- for (h = t[hashnum(index)]; h; h = h->next)
- if (h->num == index)
+ for (h = t[hashnum(idx)]; h; h = h->next)
+ if (h->num == idx)
return h->name;
return NULL;
}
@@ -406,19 +407,20 @@ static int new_videoterminal(const char *name, u_int16_t termt)
return 0;
}
-static int new_genericstrtable(struct genericstrtable *t[HASHSZ], const char *name, unsigned int index)
+static int new_genericstrtable(struct genericstrtable *t[HASHSZ],
+ const char *name, unsigned int idx)
{
struct genericstrtable *g;
- unsigned int h = hashnum(index);
+ unsigned int h = hashnum(idx);
for (g = t[h]; g; g = g->next)
- if (g->num == index)
+ if (g->num == idx)
return -1;
g = malloc(sizeof(struct genericstrtable) + strlen(name));
if (!g)
return -1;
strcpy(g->name, name);
- g->num = index;
+ g->num = idx;
g->next = t[h];
t[h] = g;
return 0;