linux-user: Use is_error() to avoid warnings and make the code clearer
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 4 Jun 2018 15:37:22 +0000 (12:37 -0300)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 11 Jun 2018 12:40:11 +0000 (14:40 +0200)
commit71987b125ba49314b631f81a4f221e010fa9be48
treebfbef1a99d620418240aff1964495fa2dcb755ce
parent1129dd712157b42397275681e6397bf2d6bdfa0e
linux-user: Use is_error() to avoid warnings and make the code clearer

This fixes:

  linux-user/flatload.c:740:9: warning: Loss of sign in implicit conversion
      if (res > (unsigned long)-4096)
          ^~~

Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180604153722.24956-3-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/flatload.c