[Reproducible-commits] [dpkg] 04/37: dselect: Use EOF instead of ERR for fgetc() errors

Jérémy Bobbio lunar at moszumanska.debian.org
Sun Jan 31 16:28:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/buildinfo
in repository dpkg.

commit 9497c00cf86c449115353284908198ee7567e440
Author: Guillem Jover <guillem at debian.org>
Date:   Wed Dec 30 02:20:34 2015 +0100

    dselect: Use EOF instead of ERR for fgetc() errors
    
    The macro ERR is a curses one, use EOF which is a stdio value.
    
    Warned-by: gcc-6
---
 dselect/method.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dselect/method.cc b/dselect/method.cc
index 2d1ebc5..5bcf7de 100644
--- a/dselect/method.cc
+++ b/dselect/method.cc
@@ -159,8 +159,10 @@ falliblesubprocess(struct command *cmd)
   }
   fprintf(stderr,_("Press <enter> to continue.\n"));
   m_output(stderr, _("<standard error>"));
-  do { c= fgetc(stdin); } while ((c == ERR && errno==EINTR) || ((c != '\n') && c != EOF));
-  if ((c == ERR) || (c == EOF))
+  do {
+    c = fgetc(stdin);
+  } while ((c == EOF && errno == EINTR) || (c != '\n' && c != EOF));
+  if (c == EOF)
     ohshite(_("error reading acknowledgement of program failure message"));
   return urqr_fail;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list