Removed unused variables, dead code, redundant casts etc.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@354 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Björn Groenvall
1996-03-28 11:10:45 +00:00
parent 98365c0be0
commit f9cfc53041
2 changed files with 6 additions and 4 deletions

View File

@@ -10,7 +10,6 @@ void utmp_login(char *tty, char *username, char *hostname)
struct utmp utmp;
struct hostent *he;
int fd;
int ttyno;
char *ttyx; /* tty w/o /dev/* */
@@ -62,11 +61,14 @@ void utmp_login(char *tty, char *username, char *hostname)
#else
#ifdef HAVE_TTYSLOT
ttyno = ttyslot();
if (ttyno > 0 && (fd = open(_PATH_UTMP, O_WRONLY, 0)) >= 0) {
{
int ttyno;
ttyno = ttyslot();
if (ttyno > 0 && (fd = open(_PATH_UTMP, O_WRONLY, 0)) >= 0) {
lseek(fd, (long)(ttyno * sizeof(struct utmp)), SEEK_SET);
write(fd, (char *)&utmp, sizeof(struct utmp));
close(fd);
}
}
#endif /* HAVE_TTYSLOT */
#endif /* HAVE_SETUTENT */

View File

@@ -33,7 +33,7 @@ OBJECTS = xnlock.o
all: $(PROGS)
Wall:
make CFLAGS="-g -Wall -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"
make CFLAGS="$(XINCS) -g -Wall -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) -I../.. -I../../include -I$(srcdir) -I$(srcdir)/../../include $(CFLAGS) $<