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]
Message-ID: <d98d1f0150bec8b69a886f77fc375b8ca9d24262.camel@perches.com>
Date:   Thu, 15 Aug 2019 16:46:01 -0700
From:   Joe Perches <joe@...ches.com>
To:     David Howells <dhowells@...hat.com>
Cc:     Nathan Chancellor <natechancellor@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nathan Huckleberry <nhuck@...gle.com>,
        linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] afs: Move comments after /* fallthrough */

On Thu, 2019-08-15 at 14:40 +0100, David Howells wrote:
> Joe Perches <joe@...ches.com> wrote:
> 
> > Make the code a bit easier for a script to appropriately convert
> > case statement blocks with /* fallthrough */ comments to a macro by
> > moving comments describing the next case block to the case statement.
> 
> This doesn't sound good.  Can you give an illustration of what a resulting
> case might look like?  Say taking the following as an example:
> 
> > @@ -282,10 +282,8 @@ static int afs_deliver_cb_callback(struct afs_call *call)
> >  	case 0:
> >  		afs_extract_to_tmp(call);
> >  		call->unmarshall++;
> > -
> > -		/* extract the FID array and its count in two steps */
> >  		/* fall through */
> > -	case 1:
> > +	case 1:		/* extract the FID array and its count in two steps */
> >  		_debug("extract FID count");
> >  		ret = afs_extract_data(call, true);
> >  		if (ret < 0)

This case above would not change, but this case below would:

diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c
index 114f281f3687..d9dc1bdfa695 100644
--- a/fs/afs/fsclient.c
+++ b/fs/afs/fsclient.c
@@ -341,8 +341,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
                }
                /* Fall through */
 
-               /* extract the returned data length */
-       case 1:
+       case 1:         /* extract the returned data length */
                _debug("extract data length");
                ret = afs_extract_data(call, true);
                if (ret < 0)

Here the script would not convert the /* Fall through */
because the next non-blank line does not start with
case or default


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ