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:	Tue, 26 Oct 2010 11:14:52 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Michał Nazarewicz <m.nazarewicz@...sung.com>
cc:	Greg Kroah-Hartman <gregkh@...e.de>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>,
	Michal Nazarewicz <mina86@...a86.com>
Subject: Re: [PATCH 1/7] USB: gadget: file_storage: put_device() in error
 recovery

On Tue, 26 Oct 2010, [utf-8] Michał Nazarewicz wrote:

> >> +		if ((rc = device_create_file(&curlun->dev, &dev_attr_ro))  ||
> >> +		    (rc = device_create_file(&curlun->dev, &dev_attr_nofua)) ||
> >> +		    (rc = device_create_file(&curlun->dev, &dev_attr_file)))
> >> +			goto out;
> >
> > As long as you're changing these anyway, you may as well use the style
> > most developers seem to prefer:
> >
> > 		rc = device_create_file(&curlun->dev, &dev_attr_ro);
> > 		if (rc)
> > 			goto out;
> > 		...
> 
> But then it'd be total of 9 lines consisting of three 3-line ifs.  I decided
> that it would be more readable with a single if even though it is not compliant
> with coding style.  What do you think?  I can just resend it.

I think you should change it as I suggested.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ