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] [day] [month] [year] [list]
Message-ID: <b597732.174e6.184c303d3c8.Coremail.nickyc975@zju.edu.cn>
Date:   Tue, 29 Nov 2022 18:51:58 +0800 (GMT+08:00)
From:   "Jinlong Chen" <nickyc975@....edu.cn>
To:     "Christoph Hellwig" <hch@....de>
Cc:     axboe@...nel.dk, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH 2/4] elevator: replace continue with else-if in
 elv_iosched_show

> >  	list_for_each_entry(e, &elv_list, list) {
> > -		if (e == cur) {
> > +		if (e == cur)
> >  			len += sprintf(name+len, "[%s] ", cur->elevator_name);
> > -			continue;
> > -		}
> > -		if (elv_support_features(q, e))
> > +		else if (elv_support_features(q, e))
> >  			len += sprintf(name+len, "%s ", e->elevator_name);
> 
> Looks good.  But to make this even more obvious I'd also switch to
> pinting e->elevator_name for the cur case instead of cur.

That's truely better. I'll send a v2 soon.

Thanks!
Jinlong Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ