Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Oct 2002 17:16:38 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 18621 for review
Message-ID:  <200210040016.g940Gc7l087327@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18621

Change 18621 by peter@peter_daintree on 2002/10/03 17:16:22

	do not add extra temp variable usage when we do not have to.

Affected files ...

.. //depot/projects/ia64/lib/libpam/modules/pam_lastlog/pam_lastlog.c#10 edit

Differences ...

==== //depot/projects/ia64/lib/libpam/modules/pam_lastlog/pam_lastlog.c#10 (text+ko) ====

@@ -126,8 +126,7 @@
 	}
 
 	bzero(&ll, sizeof(ll));
-	time(&t);
-	ll.ll_time = _time_to_time32(t);
+	ll.ll_time = _time_to_time32(time(NULL));
 
 	/* note: does not need to be NUL-terminated */
 	strncpy(ll.ll_line, tty, sizeof(ll.ll_line));
@@ -144,8 +143,7 @@
 	 * Record session in utmp(5) and wtmp(5).
 	 */
 	bzero(&utmp, sizeof(utmp));
-	time(&t);
-	utmp.ut_time = _time_to_time32(t);
+	utmp.ut_time = _time_to_time32(time(NULL));
 	/* note: does not need to be NUL-terminated */
 	strncpy(utmp.ut_name, user, sizeof(utmp.ut_name));
 	if (rhost != NULL)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210040016.g940Gc7l087327>