From: Tom Rini Date: Sat, 24 Oct 2015 17:15:06 -0400 Subject: [U-Boot] Fix bad return value checks (detected with Coccinelle) In-Reply-To: <55DC8534.6060900@tuxfamily.org> References: <55DC8534.6060900@tuxfamily.org> Message-ID: <20151024211506.GJ23893@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Aug 25, 2015 at 05:09:40PM +0200, Thomas Huth wrote: > In the "Getting Started with Coccinelle - KVM edition" presentation that > has been held by Julia Lawall at the KVM forum 2015 (see the slides at > http://events.linuxfoundation.org/sites/events/files/slides/tutorial_kvm_0.pdf), > she pointed out some bad return value checks in U-Boot that can be > detected with Coccinelle by using the following config file: > > @@ > identifier x,y; > identifier f; > statement S; > @@ > x = f(...); > ( > if (x < 0) S > | > if ( > - y > + x > < 0) S > ) > > This patch now fixes these issues. > > Signed-off-by: Thomas Huth Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: