[libvirt] [PATCH 4/5] bridge_driver: Resolve Coverity CHECKED_RETURN warning

Eric Blake eblake at redhat.com
Tue Dec 3 16:39:15 UTC 2013


On 12/03/2013 07:18 AM, John Ferlan wrote:
> The networkRegister() didn't check the return status of the
> virRegisterNetworkDriver() call like other callers, so just
> check and handle here as well.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/network/bridge_driver.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

ACK

> 
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 1e4cc70..80c5acb 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -3046,7 +3046,8 @@ static virStateDriver networkStateDriver = {
>  };
>  
>  int networkRegister(void) {
> -    virRegisterNetworkDriver(&networkDriver);
> +    if (virRegisterNetworkDriver(&networkDriver) < 0)
> +        return -1;
>      virRegisterStateDriver(&networkStateDriver);
>      return 0;
>  }
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131203/e8de840b/attachment-0001.sig>


More information about the libvir-list mailing list