/* reached the end */
if (!chunk_len) {
/* move over '0' chunked encoding terminator and any new lines */
- do {
+ while(1) {
switch (*e_ptr) {
case '0':
case '\r':
++e_ptr;
continue;
}
- } while (0);
+ break;
+ }
break;
}
php_http_encoding_stream_t *php_http_encoding_stream_copy(php_http_encoding_stream_t *from, php_http_encoding_stream_t *to)
{
if (from->ops->copy) {
- int freeme;
php_http_encoding_stream_t *ns;
- if ((freeme = !to)) {
+ if (!to) {
to = pemalloc(sizeof(*to), (from->flags & PHP_HTTP_ENCODING_STREAM_PERSISTENT));
}
memset(to, 0, sizeof(*to));
} else {
return to;
}
-
- if (freeme) {
- pefree(to, (to->flags & PHP_HTTP_ENCODING_STREAM_PERSISTENT));
- }
}
return NULL;