mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-08 20:18:11 -05:00
util: Fix condition check in virDiskNameToIndex
Use the more common '< 0' rather than the non-zero check.
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user