Commit 9257a8e6 authored by Feten Besbes's avatar Feten Besbes

Update netlink.c

parent ee84d059
Pipeline #1798 passed with stage
in 40 seconds
......@@ -50,6 +50,8 @@ static int itfcmp(char *itf1, char *itf2)
if(itf1[0] == '\0')
goto end;
str = strchr(itf1, '.');
if(str == NULL)
goto end;
index = (int)(str - itf1);
if(!index)
goto end;
......@@ -61,6 +63,8 @@ static int itfcmp(char *itf1, char *itf2)
if(itf2[0] == '\0')
goto end;
str = strchr(itf2, '.');
if(str == NULL)
goto end;
index = (int)(str - itf2);
if(!index)
goto end;
......@@ -69,7 +73,7 @@ static int itfcmp(char *itf1, char *itf2)
goto end;
buf2[index] = '\0';
strncpy(buf2, itf1, index);
if(strncmp(buf1, buf2, index) == 0)
if(strcmp(buf1, buf2) == 0)
status = 0;
end:
if(buf1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment