[U-Boot] [PATCH 3/6] video: Use 'int' for loop variables instead of short
Tom Rini
trini at konsulko.com
Mon Feb 1 17:54:48 CET 2016
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 <sjg at chromium.org>
Reviewed-by: Tom Rini <trini at konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160201/49f48a07/attachment.sig>
More information about the U-Boot
mailing list