]> git.dujemihanovic.xyz Git - u-boot.git/commit
board: ti: common: Fix pointer-bool-conversion warnings
authorTom Rini <trini@konsulko.com>
Thu, 4 Jun 2020 19:45:08 +0000 (15:45 -0400)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 16 Jun 2020 11:30:02 +0000 (17:00 +0530)
commite76e85c9f4728e4765c90cef4422d7c9172161c7
treeda470caf7cc04c1fcbb9b05ae6935d274d28b0d6
parent5b9ee0fc6f9adb05eefa457a752626cb22cca958
board: ti: common: Fix pointer-bool-conversion warnings

When building this code with clang-10 a number of warnings will be
generated along the lines of:
warning: address of array 'ep->version' will always evaluate to 'true'

Convert these checks to checking the strlen of the part of the array we
care about.  As this array will be null terminated previously by us,
this is safe.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
board/ti/common/board_detect.c