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.
This commit is contained in:
Denis Vlasenko
2007-08-19 13:42:08 +00:00
parent b9c02dd791
commit d37f22225b
9 changed files with 15 additions and 20 deletions

View File

@ -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) {