diff options
Diffstat (limited to 'libavformat/http.c')
-rw-r--r-- | libavformat/http.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 7156e0c799..d4300a67c1 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -440,13 +440,10 @@ static int http_write(URLContext *h, const uint8_t *buf, int size) if (size > 0) { /* upload data using chunked encoding */ snprintf(temp, sizeof(temp), "%x\r\n", size); - if ((ret = url_write(s->hd, temp, strlen(temp))) < 0) - return ret; - if ((ret = url_write(s->hd, buf, size)) < 0) - return ret; - - if ((ret = url_write(s->hd, crlf, sizeof(crlf) - 1)) < 0) + if ((ret = url_write(s->hd, temp, strlen(temp))) < 0 || + (ret = url_write(s->hd, buf, size)) < 0 || + (ret = url_write(s->hd, crlf, sizeof(crlf) - 1)) < 0) return ret; } return size; |