From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 1 Feb 2016 11:54:48 -0500 Subject: [U-Boot] [PATCH 3/6] video: Use 'int' for loop variables instead of short In-Reply-To: <1454193919-27264-3-git-send-email-sjg@chromium.org> References: <1454193919-27264-1-git-send-email-sjg@chromium.org> <1454193919-27264-3-git-send-email-sjg@chromium.org> Message-ID: <20160201165448.GC25786@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 Sat, Jan 30, 2016 at 03:45:16PM -0700, Simon Glass wrote: > Using short doesn't save anything and is confusing when the width and height > variables are ulong. > > This may fix Coverity CID134902 but I doubt it. It won't, that CID wants height to be sanity checked as it comes from an external source and we don't make sure it has a valid value, as far as coverity thinks at least. If you're happy with: if ((x + width) > pwidth) width = pwidth - x; if ((y + height) > priv->ysize) height = priv->ysize - y; Being sufficient sanity checking on both, I can close the defect out as a false positive. Thanks! > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: