Commit 294c3427 authored by Lionel Gauthier's avatar Lionel Gauthier

tabs 2 spaces

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5181 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 4824fdf7
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "hashtable.h" #include "hashtable.h"
#include "assertions.h"
//------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------
...@@ -49,9 +50,11 @@ static hash_size_t def_hashfunc(const uint64_t keyP) ...@@ -49,9 +50,11 @@ static hash_size_t def_hashfunc(const uint64_t keyP)
*/ */
hash_table_t *hashtable_create(hash_size_t sizeP, hash_size_t (*hashfuncP)(const uint64_t ), void (*freefuncP)(void*)) hash_table_t *hashtable_create(hash_size_t sizeP, hash_size_t (*hashfuncP)(const uint64_t ), void (*freefuncP)(void*))
{ {
hash_table_t *hashtbl; hash_table_t *hashtbl = NULL;
if(!(hashtbl=malloc(sizeof(hash_table_t)))) return NULL; if(!(hashtbl=malloc(sizeof(hash_table_t)))) {
return NULL;
}
if(!(hashtbl->nodes=calloc(sizeP, sizeof(hash_node_t*)))) { if(!(hashtbl->nodes=calloc(sizeP, sizeof(hash_node_t*)))) {
free(hashtbl); free(hashtbl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment