[hipl-commit] [trunk] Rev 4567: Replace nonstandard BSD-style type 'u_char' by the standard 'unsigned char'.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 21 May 2010 13:35:19 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 21/05/2010 at 13:35:19
Revision: 4567
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Replace nonstandard BSD-style type 'u_char' by the standard 'unsigned char'.

Modified:
  M  hipd/heartbeat.c
  M  hipd/output.c
  M  lib/tool/checksum.c

=== modified file 'hipd/heartbeat.c'
--- hipd/heartbeat.c    2010-04-09 15:20:38 +0000
+++ hipd/heartbeat.c    2010-05-21 10:34:45 +0000
@@ -131,8 +131,8 @@
     struct msghdr mhdr;
     struct cmsghdr *chdr;
     struct iovec iov[1];
-    u_char cmsgbuf[CMSG_SPACE(sizeof(struct inet6_pktinfo))];
-    u_char iovbuf[HIP_MAX_ICMP_PACKET];
+    unsigned char cmsgbuf[CMSG_SPACE(sizeof(struct inet6_pktinfo))];
+    unsigned char iovbuf[HIP_MAX_ICMP_PACKET];
     struct icmp6_hdr *icmph = NULL;
     struct inet6_pktinfo *pktinfo;
     struct sockaddr_in6 src_sin6;

=== modified file 'hipd/output.c'
--- hipd/output.c       2010-05-12 13:57:56 +0000
+++ hipd/output.c       2010-05-21 10:34:45 +0000
@@ -1365,8 +1365,8 @@
     int err                = 0, i = 0, identifier = 0;
     struct icmp6_hdr *icmph = NULL;
     struct sockaddr_in6 dst6;
-    u_char cmsgbuf[CMSG_SPACE(sizeof(struct inet6_pktinfo))];
-    u_char *icmp_pkt       = NULL;
+    unsigned char cmsgbuf[CMSG_SPACE(sizeof(struct inet6_pktinfo))];
+    unsigned char *icmp_pkt = NULL;
     struct msghdr mhdr;
     struct iovec iov[1];
     struct cmsghdr *chdr;

=== modified file 'lib/tool/checksum.c'
--- lib/tool/checksum.c 2010-04-09 16:24:44 +0000
+++ lib/tool/checksum.c 2010-05-21 10:34:45 +0000
@@ -229,7 +229,7 @@
     /* mop up an odd byte, if necessary */
     if (nbytes == 1) {
         oddbyte                = 0;     /* make sure top half is zero */
-        *((u_char *) &oddbyte) = *(u_char *) ptr;          /* one byte only */
+        *((unsigned char *) &oddbyte) = *(unsigned char *) ptr; /* one byte 
only */
         sum                   += oddbyte;
     }

Other related posts:

  • » [hipl-commit] [trunk] Rev 4567: Replace nonstandard BSD-style type 'u_char' by the standard 'unsigned char'. - Diego Biurrun