aboutsummaryrefslogtreecommitdiffstats
path: root/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'cache.c')
-rw-r--r--cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cache.c b/cache.c
index 6427b69..47cdcb4 100644
--- a/cache.c
+++ b/cache.c
@@ -214,7 +214,7 @@ unsigned long hash_str(const char *str)
214 if (!s) 214 if (!s)
215 return h; 215 return h;
216 216
217 while(*s) { 217 while (*s) {
218 h *= FNV_PRIME; 218 h *= FNV_PRIME;
219 h ^= *s++; 219 h ^= *s++;
220 } 220 }
@@ -342,7 +342,7 @@ int cache_process(int size, const char *path, const char *key, int ttl,
342 strcpy(filename, path); 342 strcpy(filename, path);
343 if (filename[len - 1] != '/') 343 if (filename[len - 1] != '/')
344 filename[len++] = '/'; 344 filename[len++] = '/';
345 for(i = 0; i < 8; i++) { 345 for (i = 0; i < 8; i++) {
346 sprintf(filename + len++, "%x", 346 sprintf(filename + len++, "%x",
347 (unsigned char)(hash & 0xf)); 347 (unsigned char)(hash & 0xf));
348 hash >>= 4; 348 hash >>= 4;
@@ -407,7 +407,7 @@ int cache_ls(const char *path)
407 *name = '\0'; 407 *name = '\0';
408 } 408 }
409 slot.cache_name = fullname; 409 slot.cache_name = fullname;
410 while((ent = readdir(dir)) != NULL) { 410 while ((ent = readdir(dir)) != NULL) {
411 if (strlen(ent->d_name) != 8) 411 if (strlen(ent->d_name) != 8)
412 continue; 412 continue;
413 strcpy(name, ent->d_name); 413 strcpy(name, ent->d_name);