]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
libxl: make GC_FREE reachable in libxl_get_scheduler()
authorChester Lin <czylin@uwaterloo.ca>
Mon, 25 Jan 2016 00:45:51 +0000 (19:45 -0500)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 26 Jan 2016 16:27:01 +0000 (16:27 +0000)
commit9937763265d9597e5f2439249b16d995842cdf0f
tree82e6c0567e4adcc7a8fadcde6246e9786ac87f86
parent337d298b0a071e55a0d934b9d8861828a35de4e8
libxl: make GC_FREE reachable in libxl_get_scheduler()

Coverity CID 1343309

Make GC_FREE reachable in all cases in libxl_get_scheduler() by
eliminating the error-path return and instead storing the error code in
the returned variable.

To make this semantically consistent, change the return type of
libxl_get_scheduler() from libxl_scheduler to int, and make a note of
the interpretation of the return value in libxl.h.  N.B. This change
does not change the API in a way that affects functionality.

The libxl_scheduler enum is consistent with the sched_id return value
of xc_sched_id and this must continue to be true.

Suggested-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Chester Lin <czylin@uwaterloo.ca>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h