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

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Tue Apr 28 19:17:21 UTC 2009


Author: nekral-guest
Date: 2009-04-28 19:17:21 +0000 (Tue, 28 Apr 2009)
New Revision: 2830

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/rlogin.c
Log:
	* libmisc/rlogin.c: Replace atoi() by getulong().


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-04-28 19:14:50 UTC (rev 2829)
+++ upstream/trunk/ChangeLog	2009-04-28 19:17:21 UTC (rev 2830)
@@ -1,5 +1,9 @@
 2009-04-28  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* libmisc/rlogin.c: Replace atoi() by getulong().
+
+2009-04-28  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* libmisc/failure.c: Replace HAVE_UTMPX_H by USE_UTMPX.
 
 2009-04-28  Nicolas François  <nicolas.francois at centraliens.net>

Modified: upstream/trunk/libmisc/rlogin.c
===================================================================
--- upstream/trunk/libmisc/rlogin.c	2009-04-28 19:14:50 UTC (rev 2829)
+++ upstream/trunk/libmisc/rlogin.c	2009-04-28 19:17:21 UTC (rev 2830)
@@ -133,7 +133,7 @@
 	struct passwd *pwd;
 	char remote_name[32];
 	char *cp;
-	int remote_speed = 9600;
+	unsigned long remote_speed = 9600;
 	int speed_name = B9600;
 	int i;
 	TERMIO termio;
@@ -147,8 +147,7 @@
 		*cp = '\0';
 		cp++;
 
-		remote_speed = atoi (cp);
-		if (0 == remote_speed) {
+		if (getulong (cp, &remote_speed) == 0) {
 			remote_speed = 9600;
 		}
 	}




More information about the Pkg-shadow-commits mailing list