From e5580888f5d5f1f5937d22ac73a9f9fdebb5ed51 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 1 Nov 2017 10:30:04 +0100 Subject: [PATCH] util: Fix condition check in virDiskNameToIndex 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 170e921920..8bdcb02fd5 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;