summaryrefslogtreecommitdiff
path: root/networking/libiproute/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/libiproute/utils.c')
-rw-r--r--networking/libiproute/utils.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c
index 552f4bf..f92179c 100644
--- a/networking/libiproute/utils.c
+++ b/networking/libiproute/utils.c
@@ -263,10 +263,7 @@ int matches(char *cmd, char *pattern)
{
int len = strlen(cmd);
- if (len > strlen(pattern)) {
- return -1;
- }
- return memcmp(pattern, cmd, len);
+ return strncmp(pattern, cmd, len);
}
int inet_addr_match(inet_prefix * a, inet_prefix * b, int bits)