summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-21 09:58:09 +0100
committerwm4 <wm4@nowhere>2014-11-21 09:58:09 +0100
commite082c2c3dfced1cd20d7c1cb7ee7a661dffc8686 (patch)
tree9f8d1cdf0cbe5db4076f8d7e7656368db01f0b2e /stream
parent38f4ec69d11979f2d7734ecf176130814f7f9891 (diff)
downloadmpv-e082c2c3dfced1cd20d7c1cb7ee7a661dffc8686.tar.bz2
mpv-e082c2c3dfced1cd20d7c1cb7ee7a661dffc8686.tar.xz
Remove some unneeded NULL checks
Found by Coverity; also see commit 85fb2af3.
Diffstat (limited to 'stream')
-rw-r--r--stream/rar.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/stream/rar.c b/stream/rar.c
index 12d3b0bfd7..7fae5e35ac 100644
--- a/stream/rar.c
+++ b/stream/rar.c
@@ -438,13 +438,12 @@ ssize_t RarRead(rar_file_t *file, void *data, size_t size)
if (max <= 0)
break;
- int r = file->s ? stream_read(file->s, data, max) : -1;
+ int r = stream_read(file->s, data, max);
if (r <= 0)
break;
total += r;
- if( data )
- data = (char *)data + r;
+ data = (char *)data + r;
file->i_pos += r;
if (file->i_pos >= chunk_end &&
RarSeek(file, file->i_pos))