LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File otp_src_R15B03-1-erts-drivers-gzio.patch of Package erlang (Project home:Ledest:erlang:R15)

diff -Ndurp otp_src_R15B03-1/erts/emulator/drivers/common/gzio.c otp_src_R15B03-1-erts-drivers-gzio/erts/emulator/drivers/common/gzio.c
--- otp_src_R15B03-1/erts/emulator/drivers/common/gzio.c	2012-12-06 16:02:45.000000000 +0200
+++ otp_src_R15B03-1-erts-drivers-gzio/erts/emulator/drivers/common/gzio.c	2015-01-18 19:12:21.000000000 +0200
@@ -720,16 +720,13 @@ local uLong getLong (s)
 int
 erts_gzclose(gzFile file)
 {
-    int err;
     gz_stream *s = (gz_stream*)file;
 
     if (s == NULL) return Z_STREAM_ERROR;
 
-    if (s->mode == 'w') {
-        err = erts_gzflush (file, Z_FINISH);
-        if (err != Z_OK) return s->destroy(file);
-    }
-    return s->destroy(file);
+    if (s->mode == 'w')
+        erts_gzflush(file, Z_FINISH);
+    return s->destroy(s);
 }