X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=phpstr%2Fphpstr.c;h=8ab8737d0d68e424426eda5ec1b75f12155de096;hb=dc7248a073febcade23e6a1a296ab1b2bb752298;hp=69f577f2da079cf1221db19c90188b215063f7e4;hpb=41d6cf70475c5a4e12dae565ffcf51de7f6fe120;p=m6w6%2Fext-http diff --git a/phpstr/phpstr.c b/phpstr/phpstr.c index 69f577f..8ab8737 100644 --- a/phpstr/phpstr.c +++ b/phpstr/phpstr.c @@ -25,7 +25,7 @@ PHPSTR_API phpstr *phpstr_init_ex(phpstr *buf, size_t chunk_size, int flags) PHPSTR_API phpstr *phpstr_from_string_ex(phpstr *buf, const char *string, size_t length) { - if (buf = phpstr_init(buf)) { + if ((buf = phpstr_init(buf))) { if (NOMEM == phpstr_append(buf, string, length)) { pefree(buf, buf->pmem); buf = NULL; @@ -346,7 +346,7 @@ PHPSTR_API void phpstr_chunked_output(phpstr **s, const char *data, size_t data_ char *chunk = NULL; size_t got = 0; - while (got = phpstr_chunk_buffer(s, data, data_len, &chunk, chunk_len)) { + while ((got = phpstr_chunk_buffer(s, data, data_len, &chunk, chunk_len))) { passthru(chunk, got TSRMLS_CC); if (!chunk_len) { /* we already got the last chunk,