Re: [PATCH] linux-user: Use "!= 0" when checking if MAP_FIXED_NOREPLACE is non-zero

2020-11-04 Thread Laurent Vivier
Le 03/11/2020 à 15:26, Peter Maydell a écrit : > 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.

Re: [PATCH] linux-user: Use "!= 0" when checking if MAP_FIXED_NOREPLACE is non-zero

2020-11-03 Thread Philippe Mathieu-Daudé
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. > > T

[PATCH] linux-user: Use "!= 0" when checking if MAP_FIXED_NOREPLACE is non-zero

2020-11-03 Thread Peter Maydell
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 r