diff options
author | Denis Vlasenko | 2007-12-09 10:03:28 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-12-09 10:03:28 +0000 |
commit | 9cb220be9dea5417c1ad0091bb7eeb1371891f89 (patch) | |
tree | 33e6f2cb5996d5cbf73b1d8fbdbfe955c847cbad /shell | |
parent | a96425fe827c603b9c576c95f12b885af68eb219 (diff) | |
download | busybox-9cb220be9dea5417c1ad0091bb7eeb1371891f89.zip busybox-9cb220be9dea5417c1ad0091bb7eeb1371891f89.tar.gz |
lineedit: don't violate API if we do simple fgets
ash: cosmetic style fixes, no code changes
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index 9b9fe5b..4c8a289 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -8553,7 +8553,7 @@ preadfd(void) goto retry; } if (nr < 0 && errno == 0) { - /* Ctrl+D presend */ + /* Ctrl+D pressed */ nr = 0; } } @@ -8564,8 +8564,8 @@ preadfd(void) if (nr < 0) { if (parsefile->fd == 0 && errno == EWOULDBLOCK) { int flags = fcntl(0, F_GETFL); - if (flags >= 0 && flags & O_NONBLOCK) { - flags &=~ O_NONBLOCK; + if (flags >= 0 && (flags & O_NONBLOCK)) { + flags &= ~O_NONBLOCK; if (fcntl(0, F_SETFL, flags) >= 0) { out2str("sh: turning off NDELAY mode\n"); goto retry; |