mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +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) {
|
int networkRegister(void) {
|
||||||
virRegisterNetworkDriver(&networkDriver);
|
if (virRegisterNetworkDriver(&networkDriver) < 0)
|
||||||
|
return -1;
|
||||||
virRegisterStateDriver(&networkStateDriver);
|
virRegisterStateDriver(&networkStateDriver);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user