diff options
Diffstat (limited to 'miscutils/conspy.c')
-rw-r--r-- | miscutils/conspy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/miscutils/conspy.c b/miscutils/conspy.c index 0d96a5f9a..f6468c116 100644 --- a/miscutils/conspy.c +++ b/miscutils/conspy.c | |||
@@ -364,8 +364,6 @@ int conspy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |||
364 | int conspy_main(int argc UNUSED_PARAM, char **argv) | 364 | int conspy_main(int argc UNUSED_PARAM, char **argv) |
365 | { | 365 | { |
366 | char tty_name[sizeof(DEV_TTY "NN")]; | 366 | char tty_name[sizeof(DEV_TTY "NN")]; |
367 | #define keybuf bb_common_bufsiz1 | ||
368 | #define sizeof_keybuf COMMON_BUFSIZE | ||
369 | struct termios termbuf; | 367 | struct termios termbuf; |
370 | unsigned opts; | 368 | unsigned opts; |
371 | unsigned ttynum; | 369 | unsigned ttynum; |
@@ -384,6 +382,9 @@ int conspy_main(int argc UNUSED_PARAM, char **argv) | |||
384 | 382 | ||
385 | applet_long_options = getopt_longopts; | 383 | applet_long_options = getopt_longopts; |
386 | #endif | 384 | #endif |
385 | #define keybuf bb_common_bufsiz1 | ||
386 | setup_common_bufsiz(); | ||
387 | |||
387 | INIT_G(); | 388 | INIT_G(); |
388 | strcpy(G.vcsa_name, DEV_VCSA); | 389 | strcpy(G.vcsa_name, DEV_VCSA); |
389 | 390 | ||
@@ -515,7 +516,7 @@ int conspy_main(int argc UNUSED_PARAM, char **argv) | |||
515 | default: | 516 | default: |
516 | // Read the keys pressed | 517 | // Read the keys pressed |
517 | k = keybuf + G.key_count; | 518 | k = keybuf + G.key_count; |
518 | bytes_read = read(G.kbd_fd, k, sizeof_keybuf - G.key_count); | 519 | bytes_read = read(G.kbd_fd, k, COMMON_BUFSIZE - G.key_count); |
519 | if (bytes_read < 0) | 520 | if (bytes_read < 0) |
520 | goto abort; | 521 | goto abort; |
521 | 522 | ||