diff options
author | 2021-07-28 08:49:32 -0400 | |
---|---|---|
committer | 2021-07-28 08:49:32 -0400 | |
commit | 9b776baaf443c0ff0c14da03fa429e0d43401480 (patch) | |
tree | bac54474a76054eb28258bfe82603aff5c863a5f /src/fids/db.c | |
parent | Merge branch 'master' of ssh://github.com/netblue30/firejail (diff) | |
download | firejail-9b776baaf443c0ff0c14da03fa429e0d43401480.tar.gz firejail-9b776baaf443c0ff0c14da03fa429e0d43401480.tar.zst firejail-9b776baaf443c0ff0c14da03fa429e0d43401480.zip |
remove compile warnings
Diffstat (limited to 'src/fids/db.c')
-rw-r--r-- | src/fids/db.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fids/db.c b/src/fids/db.c index e0021bc48..35caf7eeb 100644 --- a/src/fids/db.c +++ b/src/fids/db.c | |||
@@ -32,11 +32,10 @@ static DB *database[HASH_MAX] = {NULL}; | |||
32 | 32 | ||
33 | // djb2 hash function by Dan Bernstein | 33 | // djb2 hash function by Dan Bernstein |
34 | static unsigned hash(const char *str) { | 34 | static unsigned hash(const char *str) { |
35 | const unsigned char *s = (unsigned char *) str; | ||
36 | unsigned long hash = 5381; | 35 | unsigned long hash = 5381; |
37 | int c; | 36 | int c; |
38 | 37 | ||
39 | while (c = *s++) | 38 | while ((c = *str++) != '\0') |
40 | hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ | 39 | hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ |
41 | 40 | ||
42 | return hash & (HASH_MAX - 1); | 41 | return hash & (HASH_MAX - 1); |