src/daemon.c:176:13: warning: use of non-standard escape character '\%' [-Wpedantic]
src/dbcache.c:333:33: warning: declaration shadows a variable in the global scope [-Wshadow]
}
} else {
if (debug)
- printf("\%s\" added with %"PRIu32" Mbit bandwidth limit to cache.\n", interface, bwlimit);
+ printf("\"%s\" added with %"PRIu32" Mbit bandwidth limit to cache.\n", interface, bwlimit);
cacheadd(interface, 1);
}
}
return newhash;
}
-uint32_t simplehash(const char *data, int len)
+uint32_t simplehash(const char *input, int len)
{
uint32_t hash = len;
- if (len <= 0 || data == NULL) {
+ if (len <= 0 || input == NULL) {
return 0;
}
for (len--; len >= 0; len--) {
if (len > 0) {
- hash += (int)data[len] * len;
+ hash += (int)input[len] * len;
} else {
- hash += (int)data[len];
+ hash += (int)input[len];
}
}
int cachecount(void);
int cacheactivecount(void);
uint32_t dbcheck(uint32_t dbhash, int *forcesave);
-uint32_t simplehash(const char *data, int len);
+uint32_t simplehash(const char *input, int len);
/* global variables */
datanode *dataptr;