xl: remus/colo: only initialise ha variable when necessary
authorWei Liu <wei.liu2@citrix.com>
Mon, 6 Jun 2016 10:52:07 +0000 (11:52 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 14 Jun 2016 15:22:15 +0000 (16:22 +0100)
commit9b394b7eff681fc1b4c88d9dec88ed38ebf8c456
treebdec32d697964d976df1238cc20d613759c6730d
parentfcf3f57eeeec54091c3d5d3b00390c802345da4d
xl: remus/colo: only initialise ha variable when necessary

The original code is wrong because the common case is no HA enabled.  It
should have been set to NULL first.

Instead of setting ha to NULL, move it to the scope where it is used.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c