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:
@@ -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 */
|
||||
|
@@ -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) $<
|
||||
|
Reference in New Issue
Block a user