* libmisc/rlogin.c: Replace atoi() by getulong().

This commit is contained in:
nekral-guest 2009-04-28 19:17:21 +00:00
parent 79919f184c
commit 6547cbda6f
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2009-04-28 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/rlogin.c: Replace atoi() by getulong().
2009-04-28 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/failure.c: Replace HAVE_UTMPX_H by USE_UTMPX.

View File

@ -133,7 +133,7 @@ do_rlogin (const char *remote_host, char *name, size_t namelen, char *term,
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 @@ do_rlogin (const char *remote_host, char *name, size_t namelen, char *term,
*cp = '\0';
cp++;
remote_speed = atoi (cp);
if (0 == remote_speed) {
if (getulong (cp, &remote_speed) == 0) {
remote_speed = 9600;
}
}