X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Ffile.c;h=d59aa42b50b1a9c070023070f425b4ce63b29187;hb=234c7378ca1991d3389f25927e9e98184dccb4a1;hp=b855f56e25200bc3afa6b261675a7b752d325679;hpb=58ebb39127da500ff1d54a059ecec0b344f113dd;p=ffmpeg diff --git a/libavformat/file.c b/libavformat/file.c index b855f56e252..d59aa42b50b 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -105,19 +105,19 @@ static const AVClass pipe_class = { static int file_read(URLContext *h, unsigned char *buf, int size) { FileContext *c = h->priv_data; - int r; + int ret; size = FFMIN(size, c->blocksize); - r = read(c->fd, buf, size); - return (-1 == r)?AVERROR(errno):r; + ret = read(c->fd, buf, size); + return (ret == -1) ? AVERROR(errno) : ret; } static int file_write(URLContext *h, const unsigned char *buf, int size) { FileContext *c = h->priv_data; - int r; + int ret; size = FFMIN(size, c->blocksize); - r = write(c->fd, buf, size); - return (-1 == r)?AVERROR(errno):r; + ret = write(c->fd, buf, size); + return (ret == -1) ? AVERROR(errno) : ret; } static int file_get_handle(URLContext *h)