2013/10/23 Michal Privoznik <mprivozn(a)redhat.com>:
On 22.10.2013 14:38, Hongwei Bi wrote:
> Signed-off-by: Hongwei Bi <hwbi2008(a)gmail.com>
> ---
> 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.