summaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-01-14 20:09:06 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-01-14 20:09:06 +0100
commite351346da584402647a147514610a744ee064d8e (patch)
treec1f1889255bb315c8d94b665a2125d36248342b1 /src/hash.c
parent3c3256c5c0ca81486df3aaddf95e76d73849ba7f (diff)
downloadconntrack-tools-e351346da584402647a147514610a744ee064d8e.tar.gz
conntrack-tools-e351346da584402647a147514610a744ee064d8e.zip
hashtable: check NULL instead of ! for pointers
This patch is a cleanup. Check NULL instead of using ! for null pointers. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hash.c b/src/hash.c
index a7c7536..1edb977 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -31,7 +31,7 @@ struct hashtable_node *hashtable_alloc_node(int datasize, void *data)
int size = sizeof(struct hashtable_node) + datasize;
n = calloc(size, 1);
- if (!n)
+ if (n == NULL)
return NULL;
memcpy(n->data, data, datasize);
@@ -55,7 +55,7 @@ hashtable_create(int hashsize, int limit, int datasize,
+ hashsize * sizeof(struct slist_head);
h = (struct hashtable *) calloc(size, 1);
- if (!h) {
+ if (h == NULL) {
errno = ENOMEM;
return NULL;
}