6lowpan: iphc: Fix missing braces for if statement
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Jul 2014 01:48:43 +0000 (03:48 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Jul 2014 17:28:40 +0000 (19:28 +0200)
CHECK: braces {} should be used on all arms of this statement
+ if ((iphc0 & 0x03) != LOWPAN_IPHC_TTL_I)
[...]
+ else {
[...]

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/6lowpan/iphc.c

index e6cf68e8667fbc6ecd1b411d3cd5efc0d5a919ac..9e47702d24ddf6745b29fa6ba6f3bbecd5acf14f 100644 (file)
@@ -408,9 +408,9 @@ int lowpan_process_data(struct sk_buff *skb, struct net_device *dev,
        }
 
        /* Hop Limit */
-       if ((iphc0 & 0x03) != LOWPAN_IPHC_TTL_I)
+       if ((iphc0 & 0x03) != LOWPAN_IPHC_TTL_I) {
                hdr.hop_limit = lowpan_ttl_values[iphc0 & 0x03];
-       else {
+       else {
                if (lowpan_fetch_skb(skb, &hdr.hop_limit,
                                     sizeof(hdr.hop_limit)))
                        goto drop;