diff options
author | Guillermo Ramos | 2011-09-22 10:50:58 +0200 |
---|---|---|
committer | Guillermo Ramos | 2011-09-22 10:50:58 +0200 |
commit | 7a3fcd9d332f1f2e3e6f021b2930e148ca093c91 (patch) | |
tree | 22a618893d04d42d120718df7dbddfb3ce8015df /khm/khm.c | |
parent | d26cfab77984803f14bd198880670241f8cdffee (diff) | |
download | evspy-7a3fcd9d332f1f2e3e6f021b2930e148ca093c91.tar.gz |
Fixed bug in evs_delete macro and added some (un)likely's()
Diffstat (limited to 'khm/khm.c')
-rw-r--r-- | khm/khm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -65,7 +65,7 @@ inline struct khashmap *khm_create(void) struct khashmap *head; head = kmalloc(sizeof(struct khashmap), GFP_KERNEL); - if (!head) + if (unlikely(!head)) return NULL; INIT_LIST_HEAD(&head->l); @@ -102,7 +102,7 @@ int khm_insert(struct khashmap *head, int value, void *data) return -EINVAL; new = khm_create(); - if (!new) + if (unlikely(!new)) return -ENOMEM; new->value = value; |