1
0
mirror of https://github.com/bgp/bgpq4.git synced 2024-05-11 05:55:05 +00:00

isnumber->isdigit (Linux does not have isnumber), strlcpy header.

This commit is contained in:
Alexandre Snarskii
2015-02-23 15:43:21 +03:00
parent d787382df0
commit d034047ca5
2 changed files with 5 additions and 2 deletions

View File

@ -195,10 +195,10 @@ sx_prefix_range_parse(struct sx_radix_tree* tree, int af, int maxlen,
} else if (d[1] == '+') {
min=p.masklen;
max=maxlen;
} else if (isnumber(d[1])) {
} else if (isdigit(d[1])) {
char* dm = NULL;
min = strtoul(d+1, &dm, 10);
if (dm && *dm == '-' && isnumber(dm[1])) {
if (dm && *dm == '-' && isdigit(dm[1])) {
max = strtoul(dm+1, NULL, 10);
} else if (dm && *dm) {
sx_report(SX_ERROR, "Unable to parse prefix-range %s\n", text);

View File

@ -63,5 +63,8 @@ int sx_radix_tree_aggregate(struct sx_radix_tree* tree);
int sx_radix_tree_refine(struct sx_radix_tree* tree, unsigned refine);
int sx_radix_tree_refineLow(struct sx_radix_tree* tree, unsigned refineLow);
#ifndef HAVE_STRLCPY
size_t strlcpy(char* dst, const char* src, size_t size);
#endif
#endif