projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge branch 'v2.6.x'
[m6w6/ext-http]
/
src
/
php_http_etag.c
diff --git
a/src/php_http_etag.c
b/src/php_http_etag.c
index 3604ad8673957f6ca4f52f35420fe06cb15eae14..a02548cc028c5d0c81103abc09ce029a60588353 100644
(file)
--- a/
src/php_http_etag.c
+++ b/
src/php_http_etag.c
@@
-16,11
+16,11
@@
# include "php_hash.h"
#endif
# 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
TSRMLS_DC
)
+php_http_etag_t *php_http_etag_init(const char *mode)
{
void *ctx;
php_http_etag_t *e;
{
void *ctx;
php_http_etag_t *e;
@@
-47,7
+47,6
@@
php_http_etag_t *php_http_etag_init(const char *mode TSRMLS_DC)
e = emalloc(sizeof(*e));
e->ctx = ctx;
e->mode = estrdup(mode);
e = emalloc(sizeof(*e));
e->ctx = ctx;
e->mode = estrdup(mode);
- TSRMLS_SET_CTX(e->ts);
return e;
}
return e;
}
@@
-80,7
+79,7
@@
char *php_http_etag_finish(php_http_etag_t *e)
#ifdef PHP_HTTP_HAVE_HASH
const php_hash_ops *eho = NULL;
#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);
}
eho->hash_final(digest, e->ctx);
etag = php_http_etag_digest(digest, eho->digest_size);
}
@@
-110,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;
#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
eho->hash_update(e->ctx, (const unsigned char *) data_ptr, data_len);
}
#endif