summaryrefslogtreecommitdiff
path: root/dselect/method.cc
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2015-12-30 02:20:34 +0100
committerGuillem Jover <guillem@debian.org>2016-01-26 13:34:02 +0100
commit9497c00cf86c449115353284908198ee7567e440 (patch)
tree9534a0b4afc5bd7b614f0da0bf6627c056f26bc1 /dselect/method.cc
parent742cb8c4fd0990867dd437cf52dd86ccabdf5f05 (diff)
downloaddpkg-9497c00cf86c449115353284908198ee7567e440.tar.gz
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
Diffstat (limited to 'dselect/method.cc')
-rw-r--r--dselect/method.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/dselect/method.cc b/dselect/method.cc
index 2d1ebc59e..5bcf7de6a 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;
}