Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37895537
en ru br
ALT Linux repositórios
S:2.8-alt1
5.0: 2.3-alt4.cvs.20081130
4.1: 2.3-alt1.cvs.20080202
4.0: 2.2.cvs.16042007-alt1
3.0: 2.1-alt1

Group :: Comunicações
RPM: minicom

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: 0007-loadconv-Add-missing-fclose.patch
Download


From 1c97e4df9e01c5f22a12fb6ecce25b4d80fd8f7c Mon Sep 17 00:00:00 2001
From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Date: Mon, 13 Aug 2018 14:39:48 +0200
Subject: [PATCH 7/7] loadconv: Add missing fclose()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Issue found and reported by David Binderman.
This is a backport of commit f66b5c78.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
---
 src/config.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/config.c b/src/config.c
index 36b6e37..0da4989 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1865,6 +1865,7 @@ void doconv(void)
 int loadconv(char *buf)
 {
   FILE *fp;
+  int err = 0;
 
   if ((fp = fopen(pfix_home(buf), "rb")) == (FILE *)NULL) {
     werror(_("Cannot open conversion table %s"), pfix_home(buf));
@@ -1874,10 +1875,11 @@ int loadconv(char *buf)
       || fread(vt_outmap, sizeof(vt_outmap), (size_t)1, fp) != 1)
     {
       werror(_("Cannot read conversion table %s"), pfix_home(buf));
-      return 1;
+      err = 1;
     }
+
   fclose(fp);
-  return 0;
+  return err;
 }
 
 int saveconv(char *buf)
-- 
2.14.4
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009