summaryrefslogtreecommitdiffstats
path: root/stream/rar.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/rar.c')
-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))