summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
index faceb59b5..9291c89e6 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
@@ -45,10 +45,10 @@ static void insert_rewrite_node(struct nat_rewrite_rule *rule, struct nat_rewrit
{
struct nat_rewrite_rule *new = &root->rule;
- const size_t len = strlen(rule->prefix);
+ const int len = strlen(rule->prefix);
int i;
- if (len == 0) {
+ if (len <= 0) {
LOGP(DNAT, LOGL_ERROR, "An empty prefix does not make sense.\n");
goto fail;
}