re:[PATCH] staging: rtl8192u: fix line over 80 characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would suggest giving the reader a chance to understand the code.


 		return false;
 	} else if ((wpa_ie_len != 0)) {
 		/* parse pairwise key type */
-		if (((ieee->wpa_ie[0] == 0xdd) && (!memcmp(&(ieee->wpa_ie[14]), ccmp_ie, 4)))
|| ((ieee->wpa_ie[0] == 0x30) && (!memcmp(&ieee->wpa_ie[10], ccmp_rsn_ie, 4))))
+		 if (((ieee->wpa_ie[0] == 0xdd) &&
+		     (!memcmp(&(ieee->wpa_ie[14]), ccmp_ie, 4))) ||
+		    ((ieee->wpa_ie[0] == 0x30) &&
+		    (!memcmp(&ieee->wpa_ie[10], ccmp_rsn_ie, 4))))
 			return true;
 		else
  			return false;


my interpreation (read with out testing) of this code is:

 if (ieee->wpa_ie[0] == 0xdd && (!memcmp(&(ieee->wpa_ie[14]), ccmp_ie, 4))
    return true;

 if (ieee->wpa_ie[0] == 0x30 &&  (!memcmp(&ieee->wpa_ie[10], ccmp_rsn_ie, 4) )
    return true;

  return false;

For this its much more clear what it intended but braces are still wired.

just my 2 cents
re,
 wh
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux