From 901cb5309145f8e8de8804f053393af28e5db10628371d69a29bc3203bceac50 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Fri, 6 Mar 2020 11:15:10 +0000 Subject: [PATCH] Accepting request 779124 from home:jmoellers:branches:devel:libraries:c_c++ OBS-URL: https://build.opensuse.org/request/show/779124 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zziplib?expand=0&rev=48 --- bsc1154002-prevent-unnecessary-perror.patch | 10 +++++----- zziplib.changes | 7 +++++++ zziplib.spec | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) 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