Re: [PATCH] network: Add a missing check in bridge_driver.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/10/23 Michal Privoznik <mprivozn@xxxxxxxxxx>:
> On 22.10.2013 14:38, Hongwei Bi wrote:
>> Signed-off-by: Hongwei Bi <hwbi2008@xxxxxxxxx>
>> ---
>>  src/network/bridge_driver.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
>> index 8787bdb..73375f0 100644
>> --- a/src/network/bridge_driver.c
>> +++ b/src/network/bridge_driver.c
>> @@ -1107,7 +1107,8 @@ networkStartDhcpDaemon(virNetworkDriverStatePtr driver,
>>      if (dctx == NULL)
>>          goto cleanup;
>>
>> -    dnsmasqCapsRefresh(&driver->dnsmasqCaps, false);
>> +    if (dnsmasqCapsRefresh(&driver->dnsmasqCaps, false) < 0)
>> +     goto cleanup;
>
> s/\t/<spaces>/
>
> (make syntax-check would spot that)
>
> Moreover, if you're touching this, s/false/NULL/ as the last argument is
> 'const char *' anyway. It seems a bit odd passing 'false' there.
>
> So I'm squashing this in:
>
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 73375f0..3ce3130 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -1107,8 +1107,8 @@ networkStartDhcpDaemon(virNetworkDriverStatePtr
> driver,
>      if (dctx == NULL)
>          goto cleanup;
>
> -    if (dnsmasqCapsRefresh(&driver->dnsmasqCaps, false) < 0)
> -       goto cleanup;
> +    if (dnsmasqCapsRefresh(&driver->dnsmasqCaps, NULL) < 0)
> +        goto cleanup;
>
>      ret = networkBuildDhcpDaemonCommandLine(network, &cmd, pidfile,
>                                              dctx, driver->dnsmasqCaps);
>
> I've extended the commit message, ACKed and pushed.
>
> Michal
>

Thanks. It is mainly that I am too careless.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]