mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
bridge_driver: Resolve Coverity CHECKED_RETURN warning
The networkRegister() didn't check the return status of the virRegisterNetworkDriver() call like other callers, so just check and handle here as well.
This commit is contained in:
parent
950a493ba9
commit
b17168cbf6
@ -3046,7 +3046,8 @@ static virStateDriver networkStateDriver = {
|
||||
};
|
||||
|
||||
int networkRegister(void) {
|
||||
virRegisterNetworkDriver(&networkDriver);
|
||||
if (virRegisterNetworkDriver(&networkDriver) < 0)
|
||||
return -1;
|
||||
virRegisterStateDriver(&networkStateDriver);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user