* src/newgrp.c: Limit the scope of variable pid.
* src/login_nopam.c: Limit the scope of variables end, lineno, i, str_len. * src/logoutd.c: Limit the scope of variable c. * src/vipw.c: Re-indent. * src/vipw.c: Close the file after the creation of the backup. * src/useradd.c (set_default): Close input file on failure. * src/useradd.c: Limit the scope of variables spool, file, fd, gr, gid, mode. * src/passwd.c: Limit the scope of variables last and ok. * src/chage.c: Fix typo (non breaking space). * src/login.c: Limit the scope of variables erasechar killchar, c, failed. * src/groups.c: Limit the scope of variable ngroups, pri_grp, i. * src/id.c: Limit the scope of variable i.
This commit is contained in:
@@ -95,7 +95,6 @@ static void send_mesg_to_tty (int tty_fd)
|
||||
{
|
||||
TERMIO oldt, newt;
|
||||
FILE *mesg_file, *tty_file;
|
||||
int c;
|
||||
bool is_tty;
|
||||
|
||||
tty_file = fdopen (tty_fd, "w");
|
||||
@@ -114,6 +113,7 @@ static void send_mesg_to_tty (int tty_fd)
|
||||
|
||||
mesg_file = fopen (HUP_MESG_FILE, "r");
|
||||
if (NULL != mesg_file) {
|
||||
int c;
|
||||
while ((c = getc (mesg_file)) != EOF) {
|
||||
if (c == '\n') {
|
||||
putc ('\r', tty_file);
|
||||
|
||||
Reference in New Issue
Block a user