summaryrefslogtreecommitdiff
path: root/src/etag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/etag.c')
-rw-r--r--src/etag.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/etag.c b/src/etag.c
index 89dfb9c..4f7e95b 100644
--- a/src/etag.c
+++ b/src/etag.c
@@ -14,19 +14,19 @@ int etag_create(buffer *etag, struct stat *st) {
buffer_append_off_t(etag, st->st_size);
buffer_append_string_len(etag, CONST_STR_LEN("-"));
buffer_append_long(etag, st->st_mtime);
-
+
return 0;
}
int etag_mutate(buffer *mut, buffer *etag) {
size_t h, i;
-
+
for (h=0, i=0; i < etag->used; ++i) h = (h<<5)^(h>>27)^(etag->ptr[i]);
-
+
buffer_reset(mut);
buffer_copy_string_len(mut, CONST_STR_LEN("\""));
buffer_append_long(mut, h);
buffer_append_string_len(mut, CONST_STR_LEN("\""));
-
+
return 0;
}