X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_etag.c;h=4d34d57cd86571c77ebd04ee93b90ab8ffd380d1;hp=3604ad8673957f6ca4f52f35420fe06cb15eae14;hb=749dbbaa0e7c5e33d27121dab0f53bda85a67339;hpb=bdd6edb59194cda9e5fcb393c48ab4230fceb32a diff --git a/src/php_http_etag.c b/src/php_http_etag.c index 3604ad8..4d34d57 100644 --- a/src/php_http_etag.c +++ b/src/php_http_etag.c @@ -16,9 +16,9 @@ # include "php_hash.h" #endif -#include -#include -#include +#include "ext/standard/crc32.h" +#include "ext/standard/sha1.h" +#include "ext/standard/md5.h" php_http_etag_t *php_http_etag_init(const char *mode TSRMLS_DC) { @@ -80,7 +80,7 @@ char *php_http_etag_finish(php_http_etag_t *e) #ifdef PHP_HTTP_HAVE_HASH const php_hash_ops *eho = NULL; - if (e->mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) { + if ((eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) { eho->hash_final(digest, e->ctx); etag = php_http_etag_digest(digest, eho->digest_size); } @@ -110,7 +110,7 @@ size_t php_http_etag_update(php_http_etag_t *e, const char *data_ptr, size_t dat #ifdef PHP_HTTP_HAVE_HASH const php_hash_ops *eho = NULL; - if (e->mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) { + if ((eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) { eho->hash_update(e->ctx, (const unsigned char *) data_ptr, data_len); } #endif