lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 16 Jun 2018 15:22:07 -0400
From:   valdis.kletnieks@...edu
To:     Hyunil Kim <thtlwlsmsgkfla@...il.com>
Cc:     gregkh@...uxfoundation.org, davem@...emloft.net,
        colin.king@...onical.com, johannes.berg@...el.com,
        Linyu.Yuan@...atel-sbell.com.cn, keescook@...omium.org,
        tvboxspy@...il.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: fix line over 80 characters

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




Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ