summaryrefslogtreecommitdiffstats
path: root/libopkg/hash_table.c
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-08-17 23:39:02 (EDT)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-08-17 23:39:02 (EDT)
commit0a4946b3e913a2affe5fd342aa88e2533d06356e (patch)
treea53f2e977e6d39ac8356a9664fa46bec26c31c85 /libopkg/hash_table.c
parent0eb2cb22be9a69e9562fea935617864cc0e5f217 (diff)
Remove trailing whitespace. Sorry if this breaks your patches.
git-svn-id: http://opkg.googlecode.com/svn/trunk@552 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/hash_table.c')
-rw-r--r--libopkg/hash_table.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libopkg/hash_table.c b/libopkg/hash_table.c
index f3705ea..37b53e9 100644
--- a/libopkg/hash_table.c
+++ b/libopkg/hash_table.c
@@ -1,7 +1,7 @@
/* hash.c - hash tables for opkg
Steven M. Ayer, Jamey Hicks
-
+
Copyright (C) 2002 Compaq Computer Corporation
This program is free software; you can redistribute it and/or
@@ -108,9 +108,9 @@ void *hash_table_get(hash_table_t *hash, const char *key)
{
int ndx= hash_index(hash, key);
hash_entry_t *hash_entry = hash->entries + ndx;
- while (hash_entry)
+ while (hash_entry)
{
- if (hash_entry->key)
+ if (hash_entry->key)
{
if (strcmp(key, hash_entry->key) == 0) {
hash->n_hits++;
@@ -134,7 +134,7 @@ int hash_table_insert(hash_table_t *hash, const char *key, void *value)
hash_entry->data = value;
return 0;
} else {
- /*
+ /*
* if this is a collision, we have to go to the end of the ll,
* then add a new entry
* before we can hook up the value
@@ -170,9 +170,9 @@ int hash_table_remove(hash_table_t *hash, const char *key)
int ndx= hash_index(hash, key);
hash_entry_t *hash_entry = hash->entries + ndx;
hash_entry_t *next_entry=NULL, *last_entry=NULL;
- while (hash_entry)
+ while (hash_entry)
{
- if (hash_entry->key)
+ if (hash_entry->key)
{
if (strcmp(key, hash_entry->key) == 0) {
free(hash_entry->key);
@@ -198,7 +198,7 @@ int hash_table_remove(hash_table_t *hash, const char *key)
}
void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data)
-{
+{
int i;
if (!hash || !f)
return;