From 0cf5d09ce8faac657c1e8d5d83ecf3cb239130d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 15 Nov 2014 12:13:22 +0200 Subject: [PATCH] unzip: pass seek error to caller --- modules/access/zip/unzip/ioapi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/access/zip/unzip/ioapi.c b/modules/access/zip/unzip/ioapi.c index 42bd90367d..2e7d87198d 100644 --- a/modules/access/zip/unzip/ioapi.c +++ b/modules/access/zip/unzip/ioapi.c @@ -131,7 +131,6 @@ long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) { (void) opaque; int fseek_origin=0; - long ret; switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR : @@ -145,9 +144,7 @@ long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) break; default: return -1; } - ret = 0; - fseek((FILE *)stream, offset, fseek_origin); - return ret; + return fseek((FILE *)stream, offset, fseek_origin) ? -1 : 0; } int ZCALLBACK fclose_file_func (opaque, stream) -- 2.39.2