* libmisc/rlogin.c: Replace atoi() by getulong().
This commit is contained in:
parent
79919f184c
commit
6547cbda6f
@ -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>
|
2009-04-28 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* libmisc/failure.c: Replace HAVE_UTMPX_H by USE_UTMPX.
|
* libmisc/failure.c: Replace HAVE_UTMPX_H by USE_UTMPX.
|
||||||
|
@ -133,7 +133,7 @@ do_rlogin (const char *remote_host, char *name, size_t namelen, char *term,
|
|||||||
struct passwd *pwd;
|
struct passwd *pwd;
|
||||||
char remote_name[32];
|
char remote_name[32];
|
||||||
char *cp;
|
char *cp;
|
||||||
int remote_speed = 9600;
|
unsigned long remote_speed = 9600;
|
||||||
int speed_name = B9600;
|
int speed_name = B9600;
|
||||||
int i;
|
int i;
|
||||||
TERMIO termio;
|
TERMIO termio;
|
||||||
@ -147,8 +147,7 @@ do_rlogin (const char *remote_host, char *name, size_t namelen, char *term,
|
|||||||
*cp = '\0';
|
*cp = '\0';
|
||||||
cp++;
|
cp++;
|
||||||
|
|
||||||
remote_speed = atoi (cp);
|
if (getulong (cp, &remote_speed) == 0) {
|
||||||
if (0 == remote_speed) {
|
|
||||||
remote_speed = 9600;
|
remote_speed = 9600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user