summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index 801b05f157..5703510148 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -26,7 +26,7 @@
#include "command_match.h"
#include "memory.h"
-DEFINE_MTYPE_STATIC(LIB, CMD_MATCHSTACK, "Command Match Stack")
+DEFINE_MTYPE_STATIC(LIB, CMD_MATCHSTACK, "Command Match Stack");
#ifdef TRACE_MATCHER
#define TM 1
@@ -813,7 +813,7 @@ static enum match_type match_ipv4_prefix(const char *str)
str++;
}
- if (atoi(sp) > 32)
+ if (atoi(sp) > IPV4_MAX_BITLEN)
return no_match;
return exact_match;
@@ -948,7 +948,7 @@ static enum match_type match_ipv6_prefix(const char *str, bool prefix)
if (*endptr != '\0')
return no_match;
- if (mask < 0 || mask > 128)
+ if (mask < 0 || mask > IPV6_MAX_BITLEN)
return no_match;
return exact_match;