aboutsummaryrefslogtreecommitdiff
path: root/src/hash-table.c
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2024-09-06 21:10:21 +0200
committerThomas Schmucker <ts@its1.de>2024-09-06 21:10:21 +0200
commit9e8caf1e06ba7510160305da11a30d91dcfc23e5 (patch)
tree30da0c941191d0907abe829feb1bf75f0fca4b3a /src/hash-table.c
parent4ecdad9462c4447c1370cf1dd1341b2289c28566 (diff)
downloaddata-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.tar.gz
data-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.tar.bz2
data-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.zip
reformat source code
Diffstat (limited to 'src/hash-table.c')
-rw-r--r--src/hash-table.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash-table.c b/src/hash-table.c
index 256fac9..8c93bc6 100644
--- a/src/hash-table.c
+++ b/src/hash-table.c
@@ -11,7 +11,7 @@ typedef int T;
11 11
12struct hash_item { 12struct hash_item {
13 struct hash_item *next; 13 struct hash_item *next;
14 char * key; 14 char *key;
15 T data; 15 T data;
16}; 16};
17 17
@@ -48,7 +48,7 @@ static struct hash_item *
48hash_add(struct hash_item *next, const char *key, T data) 48hash_add(struct hash_item *next, const char *key, T data)
49{ 49{
50 struct hash_item *new_item; 50 struct hash_item *new_item;
51 char * new_key; 51 char *new_key;
52 52
53 new_key = strdup(key); // strdup: not standard but commonly used... 53 new_key = strdup(key); // strdup: not standard but commonly used...
54 new_item = malloc(sizeof *new_item); 54 new_item = malloc(sizeof *new_item);
@@ -199,7 +199,7 @@ print(const char *key, T data, void *cl)
199} 199}
200 200
201int 201int
202main() 202main(void)
203{ 203{
204 struct hash_tab ht[1]; 204 struct hash_tab ht[1];
205 char word[100]; 205 char word[100];