diff options
author | Stuart Reilly <rs576h@vyatta.att-mail.com> | 2019-06-28 16:21:49 +0100 |
---|---|---|
committer | Stuart Reilly <rs576h@vyatta.att-mail.com> | 2019-06-28 16:21:49 +0100 |
commit | f3161309ff0b0900eb0c2745518df98311934c4a (patch) | |
tree | 4aa8ec216643e1c4a52ee116b1422f5852ab11cd /src | |
parent | ef1b8e36a043509bb7fcdcc4f356f2e04d6e6117 (diff) |
Fix missing braces
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/third_party/src/ht_hash.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/third_party/src/ht_hash.c b/src/lib/third_party/src/ht_hash.c index ce50f1669..838fc2c6d 100644 --- a/src/lib/third_party/src/ht_hash.c +++ b/src/lib/third_party/src/ht_hash.c @@ -23,10 +23,10 @@ hashtable_t *ht_create(int size) { return NULL; /* Allocate pointers to the head nodes. */ - if((hashtable->table = ndpi_malloc(sizeof(entry_t *) * size)) == NULL) + if((hashtable->table = ndpi_malloc(sizeof(entry_t *) * size)) == NULL) { free(hashtable); return NULL; - else { + } else { for(i = 0; i < size; i++) hashtable->table[i] = NULL; } @@ -62,9 +62,10 @@ entry_t *ht_newpair(char *key, u_int16_t value) { if((newpair = ndpi_malloc(sizeof(entry_t))) == NULL) return NULL; - if((newpair->key = ndpi_strdup(key)) == NULL) + if((newpair->key = ndpi_strdup(key)) == NULL) { free(newpair); return NULL; + } newpair->value = value, newpair->next = NULL; |