diff --git a/libavformat/http.c b/libavformat/http.c index 7156e0c799c7d9d72626bdd410624819abaf0e3d..d4300a67c1d6d0ce1fd64075f60b3f4aa96f923f 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;