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

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

 



On Sat, 16 Jun 2018 15:00:31 +0900, Hyunil Kim said:
> *fix checkpatch.pl warnings:
>  WARNING: line over 80 characters

> +		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))))

Ouch. The && and || at ends of line mean a lot of parenthesis counting to
figure out which goes with which.  Use additional indentation to help
understanding.

+		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))))

Or perhaps

+		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))))



Attachment: pgpGNrA0JRrBc.pgp
Description: PGP signature


[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