From a4ae4201a45858516cfb3e63ffd12c2d12acbb70 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 22 Apr 2010 13:59:45 +0200 Subject: fix lots of compilation warnings in example files They have been spotted by -Wall -Wextra Signed-off-by: Pablo Neira Ayuso --- examples/rtnl-link-set.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/rtnl-link-set.c') diff --git a/examples/rtnl-link-set.c b/examples/rtnl-link-set.c index 9be6635..87ac167 100644 --- a/examples/rtnl-link-set.c +++ b/examples/rtnl-link-set.c @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include #include @@ -21,9 +23,9 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - if (strncasecmp(argv[2], "up") == 0) + if (strncasecmp(argv[2], "up", strlen("up")) == 0) oper = IF_OPER_UP; - else if (strncasecmp(argv[2], "down") == 0) + else if (strncasecmp(argv[2], "down", strlen("down")) == 0) oper = IF_OPER_DOWN; else { fprintf(stderr, "%s is not `up' nor `down'\n", argv[2]); -- cgit v1.2.3