summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko2007-08-19 13:42:08 +0000
committerDenis Vlasenko2007-08-19 13:42:08 +0000
commitd37f22225b4d10b84bbc4f6cee2e26d9f9b80fac (patch)
tree732f39f3a15dcb56986ffd3900ab2fe3c46d0338 /shell
parentb9c02dd791041a4c3b87cb38354268893d739bd0 (diff)
downloadbusybox-d37f22225b4d10b84bbc4f6cee2e26d9f9b80fac.zip
busybox-d37f22225b4d10b84bbc4f6cee2e26d9f9b80fac.tar.gz
libbb,crond,lash: fix getopt32 (don't know how it managed to slip through)
*: fcntl(fd, F_GETFL) doesn't require third parameter at all.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
-rw-r--r--shell/lash.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 9aec8ee..46f00dd 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -726,7 +726,7 @@ opentrace(void)
}
}
#ifdef O_APPEND
- flags = fcntl(fileno(tracefile), F_GETFL, 0);
+ flags = fcntl(fileno(tracefile), F_GETFL);
if (flags >= 0)
fcntl(fileno(tracefile), F_SETFL, flags | O_APPEND);
#endif
@@ -8565,7 +8565,7 @@ preadfd(void)
if (nr < 0) {
if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
- int flags = fcntl(0, F_GETFL, 0);
+ int flags = fcntl(0, F_GETFL);
if (flags >= 0 && flags & O_NONBLOCK) {
flags &=~ O_NONBLOCK;
if (fcntl(0, F_SETFL, flags) >= 0) {
diff --git a/shell/lash.c b/shell/lash.c
index c28a103..d4dba8e 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1524,7 +1524,7 @@ int lash_main(int argc_l, char **argv_l)
}
}
- opt = getopt32(argc_l, argv_l, "+ic:", &local_pending_command);
+ opt = getopt32(argv_l, "+ic:", &local_pending_command);
#define LASH_OPT_i (1<<0)
#define LASH_OPT_c (1<<1)
if (opt & LASH_OPT_c) {