Commit c6bd4eba authored by Andrew Clayton's avatar Andrew Clayton Committed by Jean-Baptiste Kempf

src/dvd_input.c: Reduce the scope of 'ret' in file_read

The ret variable is only used wihin the while loop.
Signed-off-by: 's avatarAndrew Clayton <andrew@digital-domain.net>
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 71180022
......@@ -218,13 +218,11 @@ static int file_title(dvd_input_t dev, int block)
static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags)
{
size_t len;
ssize_t ret;
len = (size_t)blocks * DVD_VIDEO_LB_LEN;
while(len > 0) {
ret = read(dev->fd, buffer, len);
ssize_t ret = read(dev->fd, buffer, len);
if(ret < 0) {
/* One of the reads failed, too bad. We won't even bother
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment