]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/file.c
Merge commit 'bbf71d46db3417b43bcbd745cbf235e8e2ff69ae'
[ffmpeg] / libavformat / file.c
index b855f56e25200bc3afa6b261675a7b752d325679..d59aa42b50b1a9c070023070f425b4ce63b29187 100644 (file)
@@ -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)