[hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 5205: cosmetics: Drop some useless parentheses, vertically align one = sign.

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Mon, 29 Nov 2010 16:15:46 -0000

------------------------------------------------------------
revno: 5205
committer: Diego Biurrun <diego@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-11-29 17:13:31 +0100
message:
  cosmetics: Drop some useless parentheses, vertically align one = sign.
modified:
  lib/tool/checksum.c


--
lp:hipl
https://code.launchpad.net/~hipl-core/hipl/trunk

Your team HIPL core team is subscribed to branch lp:hipl.
To unsubscribe from this branch go to 
https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'lib/tool/checksum.c'
--- lib/tool/checksum.c 2010-11-29 16:07:54 +0000
+++ lib/tool/checksum.c 2010-11-29 16:13:31 +0000
@@ -73,7 +73,7 @@
     /* make 16 bit words out of every two adjacent 8 bit words and */
     /* calculate the sum of all 16 vit words */
     for (i = 0; i < len; i = i + 2) {
-        word16 = ((((uint16_t) (data[i] << 8))) & 0xFF00) +
+        word16 = (((uint16_t) (data[i] << 8)) & 0xFF00) +
                  (((uint16_t) data[i + 1]) & 0xFF);
         sum    = sum + (unsigned long) word16;
     }
@@ -129,7 +129,7 @@
     chksum       += inchksum(data, len);
 
     chksum        = (chksum >> 16) + (chksum & 0xffff);
-    chksum       += (chksum >> 16);
+    chksum       +=  chksum >> 16;
 
     chksum        = (uint16_t) (~chksum);
     if (chksum == 0) {
@@ -223,7 +223,7 @@
 uint16_t hip_checksum_packet(char *data, struct sockaddr *src,
                              struct sockaddr *dst)
 {
-    uint16_t checksum      = 0;
+    uint16_t checksum = 0;
     unsigned long sum = 0;
     int count         = 0, length = 0;
     unsigned short *p = NULL;     /* 16-bit */

Other related posts:

  • » [hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 5205: cosmetics: Drop some useless parentheses, vertically align one = sign. - noreply