Module: kamailio Branch: master Commit: 5075cef8230202138bf08c402797d9dffcb8971d URL: https://github.com/kamailio/kamailio/commit/5075cef8230202138bf08c402797d9df...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-03-26T12:58:33+01:00
lib/trie: init variable to get rid of compile warnings
---
Modified: lib/trie/dtrie.c
---
Diff: https://github.com/kamailio/kamailio/commit/5075cef8230202138bf08c402797d9df... Patch: https://github.com/kamailio/kamailio/commit/5075cef8230202138bf08c402797d9df...
---
diff --git a/lib/trie/dtrie.c b/lib/trie/dtrie.c index f0b2655..28e7e7a 100644 --- a/lib/trie/dtrie.c +++ b/lib/trie/dtrie.c @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
@@ -245,7 +245,7 @@ void **dtrie_longest_match(struct dtrie_node_t *root, const char *number, digit = number[i]; if (digit>127) return ret; } - + if (node->child[digit] == NULL) return ret; node = node->child[digit]; i++; @@ -262,7 +262,7 @@ void **dtrie_longest_match(struct dtrie_node_t *root, const char *number, void **dtrie_contains(struct dtrie_node_t *root, const char *number, const unsigned int numberlen, const unsigned int branches) { - int nmatch; + int nmatch = 0; void **ret; ret = dtrie_longest_match(root, number, numberlen, &nmatch, branches);