Skip to content

Commit

Permalink
lib/trie: init variable to get rid of compile warnings
Browse files Browse the repository at this point in the history
(cherry picked from commit 5075cef)
(cherry picked from commit ed9ad74)
  • Loading branch information
miconda committed Jun 29, 2016
1 parent 0aa54ef commit 1242d88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/trie/dtrie.c
Expand Up @@ -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
*/

Expand Down Expand Up @@ -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++;
Expand All @@ -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);

Expand Down

0 comments on commit 1242d88

Please sign in to comment.