If PrlVmDev_GetType(), PrlVmDev_GetIndex() or PrlVmCfg_GetBootDevCount()
fails, return false to indicate error. Returning -1 would be interpreted
as true when used in an if-statement.
Fixes: 8c9252aa6d95247537da0939b54fdd2f31695e32
Signed-off-by: Rikard Falkeborn <rikard.falkeborn(a)gmail.com>
---
src/vz/vz_sdk.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 877692aeba..2c68c7cb27 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -1609,13 +1609,13 @@ prlsdkInBootList(PRL_HANDLE sdkdom,
size_t i;
pret = PrlVmDev_GetType(sdktargetdev, &targetType);
- prlsdkCheckRetExit(pret, -1);
+ prlsdkCheckRetExit(pret, false);
pret = PrlVmDev_GetIndex(sdktargetdev, &targetIndex);
- prlsdkCheckRetExit(pret, -1);
+ prlsdkCheckRetExit(pret, false);
pret = PrlVmCfg_GetBootDevCount(sdkdom, &bootNum);
- prlsdkCheckRetExit(pret, -1);
+ prlsdkCheckRetExit(pret, false);
for (i = 0; i < bootNum; ++i) {
pret = PrlVmCfg_GetBootDev(sdkdom, i, &bootDev);
--
2.25.1