]> xenbits.xensource.com Git - libvirt.git/commit
conf: remove pointless check on enum value
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 25 Jan 2019 11:07:20 +0000 (11:07 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 31 Jan 2019 10:38:13 +0000 (10:38 +0000)
commitdf7b679c58e5bf5a6a32bec3b1eff604c0e1cc4c
tree5d5620f9de8b828789882a2e6ba77d8a30bda8d6
parentd56afb8e3997ae19fd7449f773065a2b997dc7c1
conf: remove pointless check on enum value

'val' is initialized from virDomainCapsFeatureTypeFromString and a
few lines earlier there was already a check for 'val < 0'.

The 'val >= 0' is thus always true. The enum conversion similarly
ensures that the val will be less than VIR_DOMAIN_CAPS_FEATURE_LAST,
so "val < VIR_DOMAIN_CAPS_FEATURE_LAST' is thus always true too.

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/domain_conf.c