mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
Use ctype to make alldigits simpler.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@568 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -968,16 +968,21 @@ STRING *publickey_from_next_file(SSH_SESSION *session, const char **pub_keys_pat
|
||||
return pubkey;
|
||||
}
|
||||
|
||||
static int alldigits(char *s)
|
||||
{
|
||||
while (*s) {
|
||||
if (((*s) < '0') || ((*s) > '9')) return 0;
|
||||
s++;
|
||||
}
|
||||
return 1;
|
||||
static int alldigits(const char *s) {
|
||||
while (*s) {
|
||||
if (isdigit(*s)) {
|
||||
s++;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** @}
|
||||
*/
|
||||
|
||||
/** \addtogroup ssh_session
|
||||
* @{ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user