Merge branch 'v2.6.x'
[m6w6/ext-http] / src / php_http_etag.c
index 1ebddb35d4a7b283db6cc07c954133bbbde18c2e..a02548cc028c5d0c81103abc09ce029a60588353 100644 (file)
@@ -16,9 +16,9 @@
 #      include "php_hash.h"
 #endif
 
-#include <ext/standard/crc32.h>
-#include <ext/standard/sha1.h>
-#include <ext/standard/md5.h>
+#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)
 {
@@ -79,7 +79,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);
                }
@@ -109,7 +109,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