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:
John Ferlan 2013-12-02 15:31:42 -05:00
parent b17168cbf6
commit 37a02bab1e

View File

@ -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;
}