diff --git a/bsc1154002-prevent-unnecessary-perror.patch b/bsc1154002-prevent-unnecessary-perror.patch index 939c01d..5803c9a 100644 --- a/bsc1154002-prevent-unnecessary-perror.patch +++ b/bsc1154002-prevent-unnecessary-perror.patch @@ -2,12 +2,12 @@ Index: zziplib-0.13.69/bins/unzip-mem.c =================================================================== --- zziplib-0.13.69.orig/bins/unzip-mem.c +++ zziplib-0.13.69/bins/unzip-mem.c -@@ -93,7 +93,7 @@ static void zzip_mem_entry_make(ZZIP_MEM +@@ -92,7 +92,7 @@ static void zzip_mem_entry_make(ZZIP_MEM + ZZIP_MEM_ENTRY* entry) { FILE* file = fopen (entry->zz_name, "wb"); - if (file) { zzip_mem_entry_pipe (disk, entry, file); fclose (file); } -- perror (entry->zz_name); -+ else perror (entry->zz_name); +- if (file) { zzip_mem_entry_pipe (disk, entry, file); fclose (file); } ++ if (file) { zzip_mem_entry_pipe (disk, entry, file); fclose (file); return; } + perror (entry->zz_name); if (status < EXIT_WARNINGS) status = EXIT_WARNINGS; } - diff --git a/zziplib.changes b/zziplib.changes index f78f858..e804eae 100644 --- a/zziplib.changes +++ b/zziplib.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Feb 24 15:08:13 UTC 2020 - Josef Möllers + +- Corrected control flow in zzip_mem_entry_make() to + gain correct exit status. + [bsc#1154002, bsc1154002-prevent-unnecessary-perror.patch] + ------------------------------------------------------------------- Fri Dec 13 12:28:30 UTC 2019 - Josef Möllers diff --git a/zziplib.spec b/zziplib.spec index ba179b4..127b6a1 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ # # spec file for package zziplib # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed