aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/libnetlink.c4
-rwxr-xr-xtest/utils/shutdown4.exp4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/libnetlink.c b/src/lib/libnetlink.c
index 07457eefe..836cf417d 100644
--- a/src/lib/libnetlink.c
+++ b/src/lib/libnetlink.c
@@ -723,7 +723,7 @@ int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data)
723 int len = RTA_LENGTH(4); 723 int len = RTA_LENGTH(4);
724 struct rtattr *subrta; 724 struct rtattr *subrta;
725 725
726 if (RTA_ALIGN(rta->rta_len) + len > maxlen) { 726 if ((int) (RTA_ALIGN(rta->rta_len) + len) > maxlen) {
727 fprintf(stderr,"rta_addattr32: Error! max allowed bound %d exceeded\n",maxlen); 727 fprintf(stderr,"rta_addattr32: Error! max allowed bound %d exceeded\n",maxlen);
728 return -1; 728 return -1;
729 } 729 }
@@ -741,7 +741,7 @@ int rta_addattr_l(struct rtattr *rta, int maxlen, int type,
741 struct rtattr *subrta; 741 struct rtattr *subrta;
742 int len = RTA_LENGTH(alen); 742 int len = RTA_LENGTH(alen);
743 743
744 if (RTA_ALIGN(rta->rta_len) + RTA_ALIGN(len) > maxlen) { 744 if ((int) (RTA_ALIGN(rta->rta_len) + RTA_ALIGN(len)) > maxlen) {
745 fprintf(stderr,"rta_addattr_l: Error! max allowed bound %d exceeded\n",maxlen); 745 fprintf(stderr,"rta_addattr_l: Error! max allowed bound %d exceeded\n",maxlen);
746 return -1; 746 return -1;
747 } 747 }
diff --git a/test/utils/shutdown4.exp b/test/utils/shutdown4.exp
index 613f3fbc8..0f2e0e7fe 100755
--- a/test/utils/shutdown4.exp
+++ b/test/utils/shutdown4.exp
@@ -60,10 +60,6 @@ expect {
60 timeout {puts "TESTING ERROR 50\n";exit} 60 timeout {puts "TESTING ERROR 50\n";exit}
61 "50" 61 "50"
62} 62}
63expect {
64 timeout {puts "TESTING ERROR 60\n";exit}
65 "Killed"
66}
67sleep 1 63sleep 1
68 64
69puts "\nalldone\n" 65puts "\nalldone\n"