* lib/utent.c (getutline): Remove getutline(). This function is
no more used. * lib/groupmem.c: Limit the scope of variable i. * lib/shadow.c: Avoid implicit conversion of pointers and integers to booleans. * lib/shadow.c: Added brackets. * libmisc/limits.c: Limit the scope of variable tmpmask. * libmisc/copydir.c: Close opened file on failure. * libmisc/loginprompt.c: Limit the scope of variable envc. * libmisc/find_new_uid.c, libmisc/find_new_gid.c: Limit the scope of variable id.
This commit is contained in:
19
lib/utent.c
19
lib/utent.c
@ -88,25 +88,6 @@ struct utmp *getutent (void)
|
||||
|
||||
return &utmp_buf;
|
||||
}
|
||||
|
||||
/*
|
||||
* getutline - get the utmp entry matching ut_line
|
||||
*/
|
||||
|
||||
struct utmp *getutline (const struct utmp *utent)
|
||||
{
|
||||
struct utmp save;
|
||||
struct utmp *new;
|
||||
|
||||
save = *utent;
|
||||
while (new = getutent ())
|
||||
if (strncmp (new->ut_line, save.ut_line, sizeof new->ut_line))
|
||||
continue;
|
||||
else
|
||||
return new;
|
||||
|
||||
return (struct utmp *) 0;
|
||||
}
|
||||
#else
|
||||
extern int errno; /* warning: ANSI C forbids an empty source file */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user