summaryrefslogtreecommitdiff
path: root/legacy/eet/src/lib/eet_utils.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-07-28 01:45:57 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-07-28 01:45:57 +0000
commit926db95c5476a7e58ae30873227140b627fc292d (patch)
tree921fa2fb03c97910853287c1a15379175e845994 /legacy/eet/src/lib/eet_utils.c
parentba10bce4342f61992ceaf06dc6299639cac83a81 (diff)
testing uncrustify on eet. this shall be standard efl formatting from
now on. you may run indent on code and convert to your own formatting if you want.. but all code MUST be "uncrustified" before being cxommitted to svn or before generating patches. time to get the formatting monster under control. SVN revision: 50563
Diffstat (limited to 'legacy/eet/src/lib/eet_utils.c')
-rw-r--r--legacy/eet/src/lib/eet_utils.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/legacy/eet/src/lib/eet_utils.c b/legacy/eet/src/lib/eet_utils.c
index 46fae93d44..4d7b9dbd64 100644
--- a/legacy/eet/src/lib/eet_utils.c
+++ b/legacy/eet/src/lib/eet_utils.c
@@ -15,19 +15,20 @@
15int 15int
16_eet_hash_gen(const char *key, int hash_size) 16_eet_hash_gen(const char *key, int hash_size)
17{ 17{
18 int hash_num = 0; 18 int hash_num = 0;
19 int value, i; 19 int value, i;
20 int mask; 20 int mask;
21 unsigned char *ptr; 21 unsigned char *ptr;
22 22
23 /* no string - index 0 */ 23 /* no string - index 0 */
24 if (!key) return 0; 24 if (!key)
25 return 0;
25 26
26 /* calc hash num */ 27 /* calc hash num */
27 for (i = 0, ptr = (unsigned char *)key, value = (int)(*ptr); 28 for (i = 0, ptr = (unsigned char *)key, value = (int)(*ptr);
28 value; 29 value;
29 ptr++, i++, value = (int)(*ptr)) 30 ptr++, i++, value = (int)(*ptr))
30 hash_num ^= (value | (value << 8)) >> (i & 0x7); 31 hash_num ^= (value | (value << 8)) >> (i & 0x7);
31 32
32 /* mask it */ 33 /* mask it */
33 mask = (1 << hash_size) - 1; 34 mask = (1 << hash_size) - 1;