fwd: Squash different-signedness comparison warning
On certain architectures we get a warning about comparison between different signedness integers in fwd_probe_ephemeral(). This is because NUM_PORTS evaluates to an unsigned integer. It's a fixed value, though and we know it will fit in a signed long on anything reasonable, so add a cast to suppress the warning. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
1e76a19895
commit
c5f4e4d146
1 changed files with 2 additions and 2 deletions
4
fwd.c
4
fwd.c
|
@ -75,8 +75,8 @@ void fwd_probe_ephemeral(void)
|
|||
if (*end || errno)
|
||||
goto parse_err;
|
||||
|
||||
if (min < 0 || min >= NUM_PORTS ||
|
||||
max < 0 || max >= NUM_PORTS)
|
||||
if (min < 0 || min >= (long)NUM_PORTS ||
|
||||
max < 0 || max >= (long)NUM_PORTS)
|
||||
goto parse_err;
|
||||
|
||||
fwd_ephemeral_min = min;
|
||||
|
|
Loading…
Reference in a new issue