mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 16:15:19 +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,
|
||||
};
|
||||
|
||||
int storageRegister(void) {
|
||||
virRegisterStorageDriver(&storageDriver);
|
||||
int storageRegister(void)
|
||||
{
|
||||
if (virRegisterStorageDriver(&storageDriver) < 0)
|
||||
return -1;
|
||||
virRegisterStateDriver(&stateDriver);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user