summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorNed Ludd2005-02-10 00:44:31 +0000
committerNed Ludd2005-02-10 00:44:31 +0000
commitd1e3cbdb5a9dd026b95cb4760405f10a060ee7e7 (patch)
treeaa8818eefb95ec6deaeb35291c61879c932194a1 /shell
parent2123b7cded4d28173b8a9e5bd40c565cbb1a75b1 (diff)
downloadbusybox-d1e3cbdb5a9dd026b95cb4760405f10a060ee7e7.zip
busybox-d1e3cbdb5a9dd026b95cb4760405f10a060ee7e7.tar.gz
- no need to check if JOBS is defined. Config.in ensures it.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 5bcda74..0e9d58a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12583,7 +12583,7 @@ readcmd(int argc, char **argv)
char *prompt;
const char *ifs;
char *p;
-#if defined(CONFIG_ASH_TIMEOUT) && JOBS
+#if defined(CONFIG_ASH_TIMEOUT)
fd_set set;
int timeout;
struct timeval timeout_struct;
@@ -12595,7 +12595,7 @@ readcmd(int argc, char **argv)
rflag = 0;
prompt = NULL;
-#if defined(CONFIG_ASH_TIMEOUT) && JOBS
+#if defined(CONFIG_ASH_TIMEOUT)
timeout = 0;
while ((i = nextopt("p:rt:")) != '\0')
@@ -12607,7 +12607,7 @@ readcmd(int argc, char **argv)
prompt = optionarg;
else if (i == 'r')
rflag = 1;
-#if defined(CONFIG_ASH_TIMEOUT) && JOBS
+#if defined(CONFIG_ASH_TIMEOUT)
else
timeout = atoi(optionarg);
#endif
@@ -12619,7 +12619,7 @@ readcmd(int argc, char **argv)
error("arg count");
if ((ifs = bltinlookup("IFS")) == NULL)
ifs = defifs;
-#if defined(CONFIG_ASH_TIMEOUT) && JOBS
+#if defined(CONFIG_ASH_TIMEOUT)
c = 0;
#endif
status = 0;
@@ -12627,7 +12627,7 @@ readcmd(int argc, char **argv)
backslash = 0;
STARTSTACKSTR(p);
-#if defined(CONFIG_ASH_TIMEOUT) && JOBS
+#if defined(CONFIG_ASH_TIMEOUT)
if (timeout > 0) {
tcgetattr(0, &tty);
old_tty = tty;
@@ -12642,8 +12642,7 @@ readcmd(int argc, char **argv)
timeout_struct.tv_sec = timeout;
timeout_struct.tv_usec = 0;
- i = select (FD_SETSIZE, &set, NULL, NULL, &timeout_struct);
- if(i == 1)
+ if ((i = select (FD_SETSIZE, &set, NULL, NULL, &timeout_struct)) == 1)
{
read(0, &c, 1);
if(c == '\n' || c == 4) /* Handle newlines and EOF */