diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2011-09-03 14:05:25 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2011-09-03 14:05:25 +0200 |
commit | 9d943c7539f59f42ba8f8052497dc541fe5f0167 (patch) | |
tree | c8725127bf7a68d3d7fe57adca45c204b25adf21 /utmp.c | |
parent | 0e9a09d7718f02726b12924f7ddb05a992202aa3 (diff) | |
download | screen-9d943c7539f59f42ba8f8052497dc541fe5f0167.tar.gz |
Imported Upstream version 4.0.2upstream/4.0.2
Diffstat (limited to 'utmp.c')
-rw-r--r-- | utmp.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -21,10 +21,6 @@ **************************************************************** */ -#include "rcs.h" -RCS_ID("$Id: utmp.c,v 1.7 1994/05/31 12:33:21 mlschroe Exp $ FAU") - - #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -360,7 +356,7 @@ RemoveLoginSlot() char *tty; debug("couln't zap slot -> do mesg n\n"); D_loginttymode = 0; - if ((tty = ttyname(D_userfd)) && stat(tty, &stb) == 0 && stb.st_uid == real_uid && ((int)stb.st_mode & 0777) != 0666) + if ((tty = ttyname(D_userfd)) && stat(tty, &stb) == 0 && (int)stb.st_uid == real_uid && ((int)stb.st_mode & 0777) != 0666) { D_loginttymode = (int)stb.st_mode & 0777; chmod(D_usertty, stb.st_mode & 0600); @@ -405,14 +401,14 @@ int SetUtmp(wi) struct win *wi; { - register char *p; register slot_t slot; struct utmp u; int saved_ut; #ifdef UTHOST + char *p; char host[sizeof(D_loginhost) + 15]; #else - int host = 0; + char *host = 0; #endif /* UTHOST */ wi->w_slot = (slot_t)0; @@ -832,7 +828,7 @@ getttyent() char * getlogin() { - char *tty; + char *tty = NULL; #ifdef utmp # undef utmp #endif |