From 5af906e7c834301a0f237b50e1a1474ce0cf6da0 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 5 Nov 2006 18:05:09 +0000 Subject: rename: compare_string_array -> index_in_str_array introduce index_in_substr_array and use it in iproute2 --- networking/libiproute/utils.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'networking/libiproute/utils.c') 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) -- cgit v1.1