mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 08:35:15 +00:00
storage_driver: Resolve Coverity CHECKED_RETURN warning
The storageRegister() didn't check the return from the virRegisterStorageDriver() like other callers did, so Coverity flagged it. Just check the return and handle.
This commit is contained in:
parent
b17168cbf6
commit
37a02bab1e
@ -2644,8 +2644,10 @@ static virStateDriver stateDriver = {
|
|||||||
.stateReload = storageStateReload,
|
.stateReload = storageStateReload,
|
||||||
};
|
};
|
||||||
|
|
||||||
int storageRegister(void) {
|
int storageRegister(void)
|
||||||
virRegisterStorageDriver(&storageDriver);
|
{
|
||||||
|
if (virRegisterStorageDriver(&storageDriver) < 0)
|
||||||
|
return -1;
|
||||||
virRegisterStateDriver(&stateDriver);
|
virRegisterStateDriver(&stateDriver);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user