ide: fix enum comparison for gcc 4.7
commit159a9df02127cbf6fe640f67954794a99a12a005
authorJohn Snow <jsnow@redhat.com>
Thu, 21 Sep 2017 01:38:21 +0000 (20 21:38 -0400)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 22 Sep 2017 12:23:53 +0000 (22 13:23 +0100)
tree4735ac228153fe14aaa91f2e9e20db6b92307fc5
parenta664607440511fdf8cff9d1c2afefbdbca1d1295
ide: fix enum comparison for gcc 4.7

Apparently GCC gets bent over comparing enum values against zero.
Replace the conditional with something less readable.

Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20170921013821.1673-1-jsnow@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/ide/ahci.c
hw/ide/core.c
include/hw/ide/internal.h