[hipl-commit] [trunk] Rev 4740: firewall: fix the last signedness issues.

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 9 Jun 2010 16:25:57 +0300

Committer: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
Date: 09/06/2010 at 16:25:57
Revision: 4740
Revision-id: mircea.gherzan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  firewall: fix the last signedness issues.

Modified:
  M  firewall/firewalldb.c
  M  firewall/lsi.c
  M  firewall/rule_management.c

=== modified file 'firewall/firewalldb.c'
--- firewall/firewalldb.c       2010-05-31 09:44:40 +0000
+++ firewall/firewalldb.c       2010-06-09 13:25:36 +0000
@@ -719,7 +719,7 @@
         sent = sendto(firewall_raw_sock, iphdr,
                       iphdr->ip_len, 0,
                       (struct sockaddr *) &dst, sa_size);
-        if (sent != (len + sizeof(struct ip))) {
+        if (sent != (int)(len + sizeof(struct ip))) {
             HIP_ERROR("Could not send the all requested" \
                       " data (%d/%d)\n", sent,
                       iphdr->ip_len);

=== modified file 'firewall/lsi.c'
--- firewall/lsi.c      2010-06-08 07:28:34 +0000
+++ firewall/lsi.c      2010-06-09 13:25:36 +0000
@@ -225,7 +225,7 @@
         HIP_DEBUG_IN6ADDR("New packet dst address: ", dst_hit);
     }
 
-    if (m->data_len <= (BUFSIZE - ip_hdr_size)) {
+    if ((int)m->data_len <= (BUFSIZE - ip_hdr_size)) {
         packet_length = m->data_len - ip_hdr_size;
         HIP_DEBUG("packet size smaller than buffer size\n");
     } else {

=== modified file 'firewall/rule_management.c'
--- firewall/rule_management.c  2010-05-31 09:44:40 +0000
+++ firewall/rule_management.c  2010-06-09 13:25:36 +0000
@@ -870,7 +870,7 @@
     len = strlen(buf);
     if (buf[len - 1] == '\n') {         /* clear any trailing newline */
         buf[--len] = '\0';
-    } else if (len == buflen - 1) {     /* line too long */
+    } else if ((int)len == buflen - 1) {     /* line too long */
         while ((ch = getchar()) != '\n' && ch != EOF) {
             continue;
         }

Other related posts:

  • » [hipl-commit] [trunk] Rev 4740: firewall: fix the last signedness issues. - Mircea Gherzan