On 11/3/20 3:26 PM, Peter Maydell wrote: > In pgd_find_hole_fallback(), Coverity doesn't like the use > of "if (MAP_FIXED_NOREPLACE || ...)" because it's using a > logical operator on a constant other than 0 or 1 and its > heuristic thinks we might have intended a bitwise operator > instead. > > The logic is correct (we are checking whether the host really > has a MAP_FIXED_NOREPLACE or whether we fell back to the > "#define as 0 to ignore" from osdep.h); make Coverity > happier by explicitly writing out the comparison with zero. > > Fixes: Coverity CID 1431059 > Signed-off-by: Peter Maydell <[email protected]> > --- > linux-user/elfload.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
