Module: kamailio
Branch: master
Commit: f967d2ba2f0f6699fddf25c587fa007493d9b727
URL:
https://github.com/kamailio/kamailio/commit/f967d2ba2f0f6699fddf25c587fa007…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-20T09:43:15+01:00
lib/trie: proper support for very long numbers
---
Modified: src/lib/trie/dtrie.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f967d2ba2f0f6699fddf25c587fa007…
Patch:
https://github.com/kamailio/kamailio/commit/f967d2ba2f0f6699fddf25c587fa007…
---
diff --git a/src/lib/trie/dtrie.c b/src/lib/trie/dtrie.c
index 905ddead201..02107023080 100644
--- a/src/lib/trie/dtrie.c
+++ b/src/lib/trie/dtrie.c
@@ -126,7 +126,8 @@ int dtrie_insert(struct dtrie_node_t *root, const char *number,
void *data, const unsigned int branches)
{
struct dtrie_node_t *node = root;
- unsigned char digit, i=0;
+ unsigned char digit;
+ unsigned i=0;
if (root == NULL) return -1;
if (number == NULL) return -1;
@@ -233,7 +234,8 @@ void **dtrie_longest_match(struct dtrie_node_t *root, const char
*number,
const unsigned int branches)
{
struct dtrie_node_t *node = root;
- unsigned char digit, i = 0;
+ unsigned char digit;
+ unsigned int i = 0;
void **ret = NULL;
if (root == NULL) return NULL;