diff options
| author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-05-28 01:19:06 +0000 |
|---|---|---|
| committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-05-28 01:19:06 +0000 |
| commit | bd44397ca943560e73440b2bf4364b0f889e4e8a (patch) | |
| tree | 44562726c7e7ca0c936f6e77a5f29e31d3dec33a /util-linux | |
| parent | 312b3a6904f4c7dfc72c81b0d728839c6901a874 (diff) | |
| download | busybox-w32-bd44397ca943560e73440b2bf4364b0f889e4e8a.tar.gz busybox-w32-bd44397ca943560e73440b2bf4364b0f889e4e8a.tar.bz2 busybox-w32-bd44397ca943560e73440b2bf4364b0f889e4e8a.zip | |
Fix some warnings in allbareconfig.
git-svn-id: svn://busybox.net/trunk/busybox@15206 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/more.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/util-linux/more.c b/util-linux/more.c index beba64282..2ad1e797c 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
| @@ -67,9 +67,6 @@ int more_main(int argc, char **argv) | |||
| 67 | int len, page_height; | 67 | int len, page_height; |
| 68 | int terminal_width; | 68 | int terminal_width; |
| 69 | int terminal_height; | 69 | int terminal_height; |
| 70 | #ifndef CONFIG_FEATURE_USE_TERMIOS | ||
| 71 | int cin_fileno; | ||
| 72 | #endif | ||
| 73 | 70 | ||
| 74 | argc--; | 71 | argc--; |
| 75 | argv++; | 72 | argv++; |
| @@ -80,9 +77,9 @@ int more_main(int argc, char **argv) | |||
| 80 | cin = fopen(CURRENT_TTY, "r"); | 77 | cin = fopen(CURRENT_TTY, "r"); |
| 81 | if (!cin) | 78 | if (!cin) |
| 82 | cin = bb_xfopen(CONSOLE_DEV, "r"); | 79 | cin = bb_xfopen(CONSOLE_DEV, "r"); |
| 83 | cin_fileno = fileno(cin); | ||
| 84 | please_display_more_prompt = 2; | 80 | please_display_more_prompt = 2; |
| 85 | #ifdef CONFIG_FEATURE_USE_TERMIOS | 81 | #ifdef CONFIG_FEATURE_USE_TERMIOS |
| 82 | cin_fileno = fileno(cin); | ||
| 86 | getTermSettings(cin_fileno, &initial_settings); | 83 | getTermSettings(cin_fileno, &initial_settings); |
| 87 | new_settings = initial_settings; | 84 | new_settings = initial_settings; |
| 88 | new_settings.c_lflag &= ~ICANON; | 85 | new_settings.c_lflag &= ~ICANON; |
| @@ -112,7 +109,7 @@ int more_main(int argc, char **argv) | |||
| 112 | 109 | ||
| 113 | please_display_more_prompt &= ~1; | 110 | please_display_more_prompt &= ~1; |
| 114 | 111 | ||
| 115 | get_terminal_width_height(cin_fileno, &terminal_width, &terminal_height); | 112 | get_terminal_width_height(fileno(cin), &terminal_width, &terminal_height); |
| 116 | if (terminal_height > 4) | 113 | if (terminal_height > 4) |
| 117 | terminal_height -= 2; | 114 | terminal_height -= 2; |
| 118 | if (terminal_width > 0) | 115 | if (terminal_width > 0) |
