version 1.1.1.1, 2012/02/21 17:26:11
|
version 1.1.1.2, 2013/07/21 23:54:37
|
Line 394 community_str (struct community *com)
|
Line 394 community_str (struct community *com)
|
unsigned int |
unsigned int |
community_hash_make (struct community *com) |
community_hash_make (struct community *com) |
{ |
{ |
|
unsigned char *pnt = (unsigned char *)com->val; |
|
int size = com->size * 4; |
|
unsigned int key = 0; |
int c; |
int c; |
unsigned int key; |
|
unsigned char *pnt; |
|
|
|
key = 0; | for (c = 0; c < size; c += 4) |
pnt = (unsigned char *)com->val; | { |
| key += pnt[c]; |
for(c = 0; c < com->size * 4; c++) | key += pnt[c + 1]; |
key += pnt[c]; | key += pnt[c + 2]; |
| key += pnt[c + 3]; |
| } |
| |
return key; |
return key; |
} |
} |
|
|