diff options
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/hexedit.c | 2 | ||||
-rw-r--r-- | miscutils/less.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/hexedit.c b/miscutils/hexedit.c index f8ff9b62b..15ad78377 100644 --- a/miscutils/hexedit.c +++ b/miscutils/hexedit.c | |||
@@ -292,7 +292,7 @@ int hexedit_main(int argc UNUSED_PARAM, char **argv) | |||
292 | fflush_all(); | 292 | fflush_all(); |
293 | G.in_read_key = 1; | 293 | G.in_read_key = 1; |
294 | if (!bb_got_signal) | 294 | if (!bb_got_signal) |
295 | key = read_key(STDIN_FILENO, G.read_key_buffer, -1); | 295 | key = safe_read_key(STDIN_FILENO, G.read_key_buffer, -1); |
296 | G.in_read_key = 0; | 296 | G.in_read_key = 0; |
297 | if (bb_got_signal) | 297 | if (bb_got_signal) |
298 | key = CTRL('X'); | 298 | key = CTRL('X'); |
diff --git a/miscutils/less.c b/miscutils/less.c index 82c4b21f0..8a0525cb7 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -1137,9 +1137,9 @@ static int64_t getch_nowait(void) | |||
1137 | #endif | 1137 | #endif |
1138 | } | 1138 | } |
1139 | 1139 | ||
1140 | /* We have kbd_fd in O_NONBLOCK mode, read inside read_key() | 1140 | /* We have kbd_fd in O_NONBLOCK mode, read inside safe_read_key() |
1141 | * would not block even if there is no input available */ | 1141 | * would not block even if there is no input available */ |
1142 | key64 = read_key(kbd_fd, kbd_input, /*timeout off:*/ -2); | 1142 | key64 = safe_read_key(kbd_fd, kbd_input, /*timeout off:*/ -2); |
1143 | if ((int)key64 == -1) { | 1143 | if ((int)key64 == -1) { |
1144 | if (errno == EAGAIN) { | 1144 | if (errno == EAGAIN) { |
1145 | /* No keyboard input available. Since poll() did return, | 1145 | /* No keyboard input available. Since poll() did return, |