Use the more common '< 0' rather than the non-zero check.
---
src/util/virutil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index 170e92192..8bdcb02fd 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -562,7 +562,7 @@ int virDiskNameToIndex(const char *name)
{
int idx;
- if (virDiskNameParse(name, &idx, NULL))
+ if (virDiskNameParse(name, &idx, NULL) < 0)
idx = -1;
return idx;
--
2.14.3