| 922 |
|
patricia_node_t * |
| 923 |
|
try_search_exact (patricia_tree_t *tree, char *string) |
| 924 |
|
{ |
| 925 |
< |
prefix_t *prefix; |
| 926 |
< |
patricia_node_t *node; |
| 927 |
< |
|
| 928 |
< |
prefix = ascii2prefix (AF_INET, string); |
| 929 |
< |
printf ("try_search_exact: %s/%d\n", prefix_toa (prefix), prefix->bitlen); |
| 930 |
< |
if ((node = patricia_search_exact (tree, prefix)) == NULL) { |
| 931 |
< |
printf ("try_search_exact: not found\n"); |
| 932 |
< |
} |
| 933 |
< |
else { |
| 934 |
< |
printf ("try_search_exact: %s/%d found\n", |
| 935 |
< |
prefix_toa (node->prefix), node->prefix->bitlen); |
| 925 |
> |
prefix_t *prefix = ascii2prefix (0, string); |
| 926 |
> |
if (prefix) |
| 927 |
> |
{ |
| 928 |
> |
patricia_node_t *node = patricia_search_exact (tree, prefix); |
| 929 |
> |
Deref_Prefix (prefix); |
| 930 |
> |
return node; |
| 931 |
|
} |
| 937 |
– |
Deref_Prefix (prefix); |
| 938 |
– |
return (node); |
| 932 |
|
} |
| 933 |
|
|
| 934 |
|
void |