From: Pierangelo Masarati Date: Fri, 9 Dec 2005 18:11:07 +0000 (+0000) Subject: allow parsing of numbers in whatever base (ITS#4257) X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~615 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=93d0ef91e65c6d11991b1c36faba67f212f43a34;p=openldap allow parsing of numbers in whatever base (ITS#4257) --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 3959df44d0..13cf3f619e 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -192,7 +192,7 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) { iarg = 0; larg = 0; barg = 0; switch(arg_type & ARGS_NUMERIC) { case ARG_INT: - if ( lutil_atoi( &iarg, c->argv[1] ) != 0 ) { + if ( lutil_atoix( &iarg, c->argv[1], 0 ) != 0 ) { snprintf( c->msg, sizeof( c->msg ), "<%s> unable to parse \"%s\" as int", c->argv[0], c->argv[1] ); @@ -202,7 +202,7 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) { } break; case ARG_LONG: - if ( lutil_atol( &larg, c->argv[1] ) != 0 ) { + if ( lutil_atolx( &larg, c->argv[1], 0 ) != 0 ) { snprintf( c->msg, sizeof( c->msg ), "<%s> unable to parse \"%s\" as long", c->argv[0], c->argv[1] ); @@ -213,7 +213,7 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) { break; case ARG_BER_LEN_T: { unsigned long l; - if ( lutil_atoul( &l, c->argv[1] ) != 0 ) { + if ( lutil_atoulx( &l, c->argv[1], 0 ) != 0 ) { snprintf( c->msg, sizeof( c->msg ), "<%s> unable to parse \"%s\" as ber_len_t", c->argv[0], c->argv[1] );