mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
util: Fix condition check in virDiskNameToIndex
Use the more common '< 0' rather than the non-zero check.
This commit is contained in:
parent
ae1b5d47e5
commit
e5580888f5
@ -562,7 +562,7 @@ int virDiskNameToIndex(const char *name)
|
|||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
if (virDiskNameParse(name, &idx, NULL))
|
if (virDiskNameParse(name, &idx, NULL) < 0)
|
||||||
idx = -1;
|
idx = -1;
|
||||||
|
|
||||||
return idx;
|
return idx;
|
||||||
|
Loading…
Reference in New Issue
Block a user