Add DJB hash function to misc.[ch] and use it

This commit is contained in:
Julien BLACHE
2009-04-30 14:51:36 +02:00
parent 0a1c4545dc
commit e5cc417e96
4 changed files with 26 additions and 6 deletions

View File

@@ -2,10 +2,15 @@
#ifndef __MISC_H__
#define __MISC_H__
#include <stdint.h>
int
safe_atoi(const char *str, int *val);
int
safe_atol(const char *str, long *val);
uint32_t
djb_hash(void *data, size_t len);
#endif /* !__MISC_H__ */