diff options
author | Denis Vlasenko | 2007-01-27 22:21:12 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-01-27 22:21:12 +0000 |
commit | e06bed30cfcde7b9e320aff8a4c878c72416c4c4 (patch) | |
tree | da3276ab5bc224a64fb9f7d7d2a8a046816ec533 /loginutils | |
parent | cd75a96f0f9d446028cad7e4b9b9224e009752e1 (diff) | |
download | busybox-e06bed30cfcde7b9e320aff8a4c878c72416c4c4.zip busybox-e06bed30cfcde7b9e320aff8a4c878c72416c4c4.tar.gz |
use bb_sanitize_stdio() where appropriate
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/getty.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index be49389..f2c2b4a 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -264,7 +264,7 @@ static void open_tty(char *tty, struct termios *tp, int local) */ if ((fcntl(0, F_GETFL, 0) & O_RDWR) != O_RDWR) - bb_error_msg_and_die("%s: not open for read/write", tty); + bb_error_msg_and_die("stdin is not open for read/write"); } /* Replace current standard output/error fd's with new ones */ @@ -314,7 +314,8 @@ static void open_tty(char *tty, struct termios *tp, int local) strcpy(vcsa, "vcsa"); strcpy(vcsa + 4, tty + 3); - id = (gr = getgrnam("sys")) ? gr->gr_gid : 0; + gr = getgrnam("sys"); + id = gr ? gr->gr_gid : 0; chown(vcs, 0, id); chmod(vcs, 0600); chown(vcsa, 0, id); @@ -628,8 +629,8 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat tp->c_cflag |= CS7; break; } - /* Account for upper case without lower case. */ + /* Account for upper case without lower case. */ #ifdef HANDLE_ALLCAPS if (cp->capslock) { tp->c_iflag |= IUCLC; |