X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_cache_api.c;h=b6c4fad5963ca79fa7041cbcf7080fb8094d1f14;hp=f7f0c816e23a67ef4b55c2e1134a8fb36b900812;hb=83fd027955844693c39e45aae8105de6c36d2887;hpb=b3afcfc70bf06c062115f4994cc04fc8c6e4aa67 diff --git a/http_cache_api.c b/http_cache_api.c index f7f0c81..b6c4fad 100644 --- a/http_cache_api.c +++ b/http_cache_api.c @@ -45,9 +45,9 @@ PHP_HTTP_API char *_http_etag(const void *data_ptr, size_t data_len, http_send_m return NULL; } else { size_t ssb_len; - char ssb_buf[128] = {0}; + char ssb_buf[128]; - ssb_len = snprintf(ssb_buf, 127, "%ld=%ld=%ld", (long) ssb.sb.st_mtime, + ssb_len = snprintf(ssb_buf, sizeof(ssb_buf), "%ld=%ld=%ld", (long) ssb.sb.st_mtime, (long) ssb.sb.st_ino, (long) ssb.sb.st_size); http_etag_update(ctx, ssb_buf, ssb_len);