archive/iso9660: simplify _read()

This commit is contained in:
Max Kellermann
2013-11-23 18:51:38 +01:00
parent 99527051b5
commit 75e9c798e0

View File

@@ -201,7 +201,9 @@ iso9660_input_read(InputStream *is, void *ptr, size_t size,
} else { } else {
no_blocks = size / ISO_BLOCKSIZE; no_blocks = size / ISO_BLOCKSIZE;
} }
if (no_blocks > 0) {
if (no_blocks == 0)
return 0;
cur_block = is->offset / ISO_BLOCKSIZE; cur_block = is->offset / ISO_BLOCKSIZE;
@@ -219,7 +221,6 @@ iso9660_input_read(InputStream *is, void *ptr, size_t size,
} }
is->offset += readed; is->offset += readed;
}
return readed; return readed;
} }