[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] s390: avoid always-true comparison in s390_pc
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-trivial] [PATCH] s390: avoid always-true comparison in s390_pci_generate_fid() |
Date: |
Thu, 20 Oct 2016 15:26:12 +0200 |
On Thu, 20 Oct 2016 13:57:06 +0100
Peter Maydell <address@hidden> wrote:
> Coverity points out that the comparison "fid <= ZPCI_MAX_FID"
> in s390_pci_generate_fid() is always true (because fid
> is 32 bits and ZPCI_MAX_FID is 0xffffffff). This isn't a
> bug because the real loop termination condition is
> expressed later via an "if (...) break;" inside the loop,
> but it is a bit odd. Rephrase the loop to avoid the
> unnecessary duplicate-but-never-true conditional.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> hw/s390x/s390-pci-bus.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
Acked-by: Cornelia Huck <address@hidden>
I assume this will go via the trivial tree?