xenstat: fix unsigned less-than-0 comparison
authorMatthew Daley <mattd@bugfuzz.com>
Sun, 4 May 2014 08:31:46 +0000 (20:31 +1200)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 8 May 2014 09:48:15 +0000 (10:48 +0100)
commit261bf3449737728975a164d0ecde2f3105d2a3c1
treec59a32b0ab555edce4718bc0c5269b7cdd9b7be1
parentfecc45fa4afe63ef0dd2b06d725f2233bbb79510
xenstat: fix unsigned less-than-0 comparison

Commit 1438d36f ("xenstat: Fix buffer over-run with new_domains being
negative.") attempted to fix the handling of a negative error result
from xc_domain_getinfolist in xenstat_get_node. However, it forgot to
change the result variable from an unsigned type to a signed one.

Do so, allowing the error result to be handled properly.

Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/xenstat/libxenstat/src/xenstat.c