network: fix check for ambiguous lookup
gcc -O2 complained: ../../src/conf/network_conf.c: In function 'virNetworkDefUpdateDNSSrv': ../../src/conf/network_conf.c:3232: error: 'foundIdx' may be used uninitialized in this function [-Wuninitialized] It turned out to be a spurious warning (we didn't use foundIdx unless foundCt was non-zero). But in investigating that, I noticed a worse problem: we were using 'if (foundCt > 1)', but since foundCt was bool, it could never be > 1. * src/conf/network_conf.c (virNetworkDefUpdateDNSHost): Use correct type. (virNetworkDefUpdateDNSSrv): Likewise, and silence compiler warning.
Showing
想要评论请 注册 或 登录