From aba6f8182e97a45cbd832f99ce9f8b7ce4f2ce40 Mon Sep 17 00:00:00 2001 From: des Date: Thu, 24 Jan 2002 16:14:56 +0000 Subject: Style nits. Sponsored by: DARPA, NAI Labs --- lib/libpam/modules/pam_lastlog/pam_lastlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libpam/modules/pam_lastlog') diff --git a/lib/libpam/modules/pam_lastlog/pam_lastlog.c b/lib/libpam/modules/pam_lastlog/pam_lastlog.c index e6ca3ce..ff7c1d3 100644 --- a/lib/libpam/modules/pam_lastlog/pam_lastlog.c +++ b/lib/libpam/modules/pam_lastlog/pam_lastlog.c @@ -161,7 +161,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) time(&utmp.ut_time); /* note: does not need to be NUL-terminated */ strncpy(utmp.ut_name, user, sizeof(utmp.ut_name)); - if (rhost) + if (rhost != NULL) strncpy(utmp.ut_host, rhost, sizeof(utmp.ut_host)); (void)strncpy(utmp.ut_line, tty, sizeof(utmp.ut_line)); login(&utmp); @@ -201,7 +201,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) /* note: does not need to be NUL-terminated */ strncpy(ll.ll_line, tty, sizeof(ll.ll_line)); - if (rhost) + if (rhost != NULL) /* note: does not need to be NUL-terminated */ strncpy(ll.ll_host, rhost, sizeof(ll.ll_host)); -- cgit v1.1