[Pkg-shadow-commits] r2757 - in upstream/trunk: . libmisc

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Wed Apr 22 21:04:17 UTC 2009


Author: nekral-guest
Date: 2009-04-22 21:04:16 +0000 (Wed, 22 Apr 2009)
New Revision: 2757

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/utmp.c
Log:
	* libmisc/utmp.c: Fix the check for empty host in prepare_utmp()
	and prepare_utmpx().


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-04-22 21:02:46 UTC (rev 2756)
+++ upstream/trunk/ChangeLog	2009-04-22 21:04:16 UTC (rev 2757)
@@ -1,10 +1,16 @@
 2009-04-22  Nicolas François  <nicolas.francois at centraliens.net>
 
-	* libmisc/utmp.c: The ut argument of prepare_utmp() might be NULL.
-	ut_id needs to be forged in that case.
+	* libmisc/utmp.c: Fix the check for empty host in prepare_utmp()
+	and prepare_utmpx().
 
 2009-04-22  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* libmisc/utmp.c: The ut argument of prepare_utmp() and
+	prepare_utmpx () might be NULL. ut_id needs to be forged in that
+	case.
+
+2009-04-22  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* libmisc/utmp.c: Removed old documentation of setutmp().
 
 2009-04-22  Nicolas François  <nicolas.francois at centraliens.net>

Modified: upstream/trunk/libmisc/utmp.c
===================================================================
--- upstream/trunk/libmisc/utmp.c	2009-04-22 21:02:46 UTC (rev 2756)
+++ upstream/trunk/libmisc/utmp.c	2009-04-22 21:04:16 UTC (rev 2757)
@@ -198,7 +198,7 @@
 
 
 	if (   (NULL != host)
-	    && ('\0' != host)) {
+	    && ('\0' != host[0])) {
 		hostname = (char *) xmalloc (strlen (host) + 1);
 		strcpy (hostname, host);
 #ifdef HAVE_STRUCT_UTMP_UT_HOST
@@ -340,7 +340,7 @@
 
 
 	if (   (NULL != host)
-	    && ('\0' != host)) {
+	    && ('\0' != host[0])) {
 		hostname = (char *) xmalloc (strlen (host) + 1);
 		strcpy (hostname, host);
 #ifdef HAVE_STRUCT_UTMP_UT_HOST




More information about the Pkg-shadow-commits mailing list