[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58430] trunk/blender/source/blender/ blenlib/intern/BLI_ghash.c: revert r58419.
Campbell Barton
ideasman42 at gmail.com
Sat Jul 20 02:15:02 CEST 2013
Revision: 58430
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58430
Author: campbellbarton
Date: 2013-07-20 00:15:01 +0000 (Sat, 20 Jul 2013)
Log Message:
-----------
revert r58419. caller should do NULL check here.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58419
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
Modified: trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_ghash.c 2013-07-19 23:59:40 UTC (rev 58429)
+++ trunk/blender/source/blender/blenlib/intern/BLI_ghash.c 2013-07-20 00:15:01 UTC (rev 58430)
@@ -116,14 +116,9 @@
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;
More information about the Bf-blender-cvs
mailing list