[vlc-commits] unzip: pass seek error to caller

Rémi Denis-Courmont git at videolan.org
Sat Nov 15 11:21:13 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 15 12:13:22 2014 +0200| [0cf5d09ce8faac657c1e8d5d83ecf3cb239130d3] | committer: Rémi Denis-Courmont

unzip: pass seek error to caller

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0cf5d09ce8faac657c1e8d5d83ecf3cb239130d3
---

 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 42bd903..2e7d871 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)



More information about the vlc-commits mailing list