提交 e5580888 编写于 作者: P Peter Krempa

util: Fix condition check in virDiskNameToIndex

Use the more common '< 0' rather than the non-zero check.
上级 ae1b5d47
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册