Cosmetic fixes

Previous commits, to keep readability of the diffs, left the code that
was previously wrapped by preprocessor coditionals untouched.  Apply
some minor cosmetic changes to merge it in the surrounding code.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2022-12-21 18:44:06 +01:00 committed by Iker Pedrosa
parent 3be7b9d75a
commit b990b167d4
3 changed files with 4 additions and 9 deletions

View File

@ -242,9 +242,7 @@ void failprint (const struct faillog *fail)
* maintains a record of all login failures. * maintains a record of all login failures.
*/ */
void failtmp (const char *username, void failtmp (const char *username, const struct utmp *failent)
const struct utmp *failent
)
{ {
const char *ftmp; const char *ftmp;
int fd; int fd;

View File

@ -107,8 +107,7 @@ static /*@observer@*/const char *get_failent_user (/*@returned@*/const char *use
static void update_utmp (const char *user, static void update_utmp (const char *user,
const char *tty, const char *tty,
const char *host, const char *host,
/*@null@*/const struct utmp *utent /*@null@*/const struct utmp *utent);
);
#ifndef USE_PAM #ifndef USE_PAM
static struct faillog faillog; static struct faillog faillog;
@ -458,8 +457,7 @@ static /*@observer@*/const char *get_failent_user (/*@returned@*/const char *use
static void update_utmp (const char *user, static void update_utmp (const char *user,
const char *tty, const char *tty,
const char *host, const char *host,
/*@null@*/const struct utmp *utent /*@null@*/const struct utmp *utent)
)
{ {
struct utmp *ut = prepare_utmp (user, tty, host, utent); struct utmp *ut = prepare_utmp (user, tty, host, utent);

View File

@ -175,8 +175,7 @@ int main (int argc, char **argv)
* for login sessions will be checked to see if the user * for login sessions will be checked to see if the user
* is permitted to be signed on at this time. * is permitted to be signed on at this time.
*/ */
while ((ut = getutent ()) != NULL) while ((ut = getutent ()) != NULL) {
{
if (ut->ut_type != USER_PROCESS) { if (ut->ut_type != USER_PROCESS) {
continue; continue;
} }