tools: value checks in rkcommon_check_params()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 9 May 2020 19:31:03 +0000 (21:31 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 22 May 2020 12:53:20 +0000 (20:53 +0800)
commit69cd0c463d4bd8b9c3c20c96640c612333947d7e
tree370fe6ef6360a40a75f84da393577936984b694c
parent0672e9803b88cbc8268ee65120cfa27fe8e2fb82
tools: value checks in rkcommon_check_params()

Building with -Wtype-limits yields

tools/rkcommon.c: In function ‘rkcommon_check_params’:
tools/rkcommon.c:158:27: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
  158 |  if (spl_params.init_size < 0)
      |                           ^
tools/rkcommon.c:165:28: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
  165 |   if (spl_params.boot_size < 0)
      |

Fix the value checks.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
tools/rkcommon.c