mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +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;
|
||||
|
||||
if (virDiskNameParse(name, &idx, NULL))
|
||||
if (virDiskNameParse(name, &idx, NULL) < 0)
|
||||
idx = -1;
|
||||
|
||||
return idx;
|
||||
|
Loading…
Reference in New Issue
Block a user