diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-20 04:15:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-20 04:15:01 +0400 |
commit | 4b0f50597f9c625b55e97c579db7b4159dc22372 (patch) | |
tree | 4d31bfe099677b49eaed6068d456821dbaee085f /source | |
parent | ac1d58d962084df88a699eec6abe267444295fd6 (diff) |
revert r58419. caller should do NULL check here.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/BLI_ghash.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 5b9045b1ba2..d30d3f3d256 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -116,14 +116,9 @@ void BLI_ghash_insert(GHash *gh, void *key, void *val) void *BLI_ghash_lookup(GHash *gh, const void *key) { - - unsigned int hash; + const unsigned int hash = gh->hashfp(key) % gh->nbuckets; Entry *e; - if (!gh) return NULL; - - hash = gh->hashfp(key) % gh->nbuckets; - for (e = gh->buckets[hash]; e; e = e->next) { if (gh->cmpfp(key, e->key) == 0) { return e->val; |