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:   Fri, 06 Jul 2018 14:29:24 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        "David S. Miller" <davem@...emloft.net>
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wireless: mark expected switch fall-throughs

Hi Gustavo,

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.

You dropped the remark saying you didn't review them, but did you?

>  	case NL80211_CHAN_WIDTH_20:
>  		if (!ht_cap->ht_supported)
>  			return false;
> +		/* else: fall through */

What's the point in else:?

We also don't necessarily write

if (!...)
  return false;
else
  do_something();

but rather

if (!...)
  return false;
do_something().

I think I'd prefer without the "else:"

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ