libxc/pm: Fix NULL pointer checks.
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 Sep 2013 09:29:39 +0000 (10:29 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 10 Sep 2013 10:44:02 +0000 (11:44 +0100)
commit7bd26ee30d01c36cb94f9a246bf03e8b4f902da9
tree7a5951f84cfc2998d8382d695871883a38b47914
parent6bc02f74af03e65b5bb62450c1be43ea0f5d2989
libxc/pm: Fix NULL pointer checks.

Discovered by Coverity,
CIDs 1054968 1054969 1054970 1054971 1054972 1054973 10549704

This was broken by c/s 5cc436c1d2b3b0 which did a blanket change of 'int
xc_handle' -> 'xc_interface *xch'.  The types got updated, but error
conditions were left as-were.  (I suspect some sed was involved originally)

Also while playing around in this area, fix up some of the bracketing style to
match the Xen coding style.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxc/xc_pm.c