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 utmp utmp;
|
||||||
struct hostent *he;
|
struct hostent *he;
|
||||||
int fd;
|
int fd;
|
||||||
int ttyno;
|
|
||||||
|
|
||||||
char *ttyx; /* tty w/o /dev/* */
|
char *ttyx; /* tty w/o /dev/* */
|
||||||
|
|
||||||
@@ -62,12 +61,15 @@ void utmp_login(char *tty, char *username, char *hostname)
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef HAVE_TTYSLOT
|
#ifdef HAVE_TTYSLOT
|
||||||
|
{
|
||||||
|
int ttyno;
|
||||||
ttyno = ttyslot();
|
ttyno = ttyslot();
|
||||||
if (ttyno > 0 && (fd = open(_PATH_UTMP, O_WRONLY, 0)) >= 0) {
|
if (ttyno > 0 && (fd = open(_PATH_UTMP, O_WRONLY, 0)) >= 0) {
|
||||||
lseek(fd, (long)(ttyno * sizeof(struct utmp)), SEEK_SET);
|
lseek(fd, (long)(ttyno * sizeof(struct utmp)), SEEK_SET);
|
||||||
write(fd, (char *)&utmp, sizeof(struct utmp));
|
write(fd, (char *)&utmp, sizeof(struct utmp));
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif /* HAVE_TTYSLOT */
|
#endif /* HAVE_TTYSLOT */
|
||||||
#endif /* HAVE_SETUTENT */
|
#endif /* HAVE_SETUTENT */
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ OBJECTS = xnlock.o
|
|||||||
all: $(PROGS)
|
all: $(PROGS)
|
||||||
|
|
||||||
Wall:
|
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:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(DEFS) -I../.. -I../../include -I$(srcdir) -I$(srcdir)/../../include $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(DEFS) -I../.. -I../../include -I$(srcdir) -I$(srcdir)/../../include $(CFLAGS) $<
|
||||||
|
Reference in New Issue
Block a user