[U-Boot] common: hash: zero end the string instead of the pointer

Tom Rini trini at ti.com
Thu Jun 12 00:19:42 CEST 2014


On Mon, Jun 09, 2014 at 11:02:02AM +0200, Jeroen Hofstee wrote:

> if algo->digest_size is zero nothing is set in the str_output
> buffer. An attempt is made to zero end the buffer, but the
> pointer to the buffer is set to zero instead. I am unaware if
> it causes any actual problems, but solves the following warning:
> 
> common/hash.c:217:13: warning: expression which evaluates to zero treated as
> a null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
>                 str_ptr = '\0';
>                           ^~~~
> 
> cc: Simon Glass <sjg at chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140611/7647ac5c/attachment.pgp>


More information about the U-Boot mailing list