diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-14 12:29:22 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-14 12:29:22 +0100 |
commit | ba53137f1b687b1c9cbd66fbe306ed1bf6d0cccb (patch) | |
tree | 55cebfa7f54b14601eccbd1bf1f50e33ceee5d76 /src/kernel/core | |
parent | 630c28c3fd3297c7a0ea7ec7ad4417f521fdaa7f (diff) | |
download | kogata-ba53137f1b687b1c9cbd66fbe306ed1bf6d0cccb.tar.gz kogata-ba53137f1b687b1c9cbd66fbe306ed1bf6d0cccb.zip |
Change hashtbl memory freeing method
Diffstat (limited to 'src/kernel/core')
-rw-r--r-- | src/kernel/core/kmain.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c index ee6d8b2..ce3f536 100644 --- a/src/kernel/core/kmain.c +++ b/src/kernel/core/kmain.c @@ -125,7 +125,7 @@ void kmalloc_test(void* kernel_data_end) { void test_hashtbl_1() { dbg_printf("(BEGIN-TEST 'test-hashtbl-1)\n"); // hashtable test - hashtbl_t *ht = create_hashtbl(str_key_eq_fun, str_hash_fun, 0, 0); + hashtbl_t *ht = create_hashtbl(str_key_eq_fun, str_hash_fun, 0); ASSERT(ht != 0); ASSERT(hashtbl_add(ht, "test1", "STRTEST1")); @@ -151,7 +151,7 @@ void test_hashtbl_1() { ASSERT(hashtbl_find(ht, "test") != 0 && strcmp(hashtbl_find(ht, "test"), "Forever alone") == 0); - delete_hashtbl(ht, 0); + delete_hashtbl(ht); dbg_printf("(TEST-OK)\n"); } @@ -159,7 +159,7 @@ void test_hashtbl_1() { void test_hashtbl_2() { dbg_printf("(BEGIN-TEST 'test-hashtbl-2)\n"); - hashtbl_t *ht = create_hashtbl(id_key_eq_fun, id_hash_fun, 0, 0); + hashtbl_t *ht = create_hashtbl(id_key_eq_fun, id_hash_fun, 0); ASSERT(ht != 0); ASSERT(hashtbl_add(ht, (void*)12, "TESTSTR12")); @@ -187,7 +187,7 @@ void test_hashtbl_2() { ASSERT(hashtbl_find(ht, (void*)777) != 0 && strcmp(hashtbl_find(ht, (void*)777), "TESTSTR777") == 0); - delete_hashtbl(ht, 0); + delete_hashtbl(ht); dbg_printf("(TEST-OK)\n"); } |