[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxl: tidy libxl_get_scheduler() according to CODING_STYLE



commit 337d298b0a071e55a0d934b9d8861828a35de4e8
Author:     Chester Lin <czylin@xxxxxxxxxxxx>
AuthorDate: Sun Jan 24 19:45:34 2016 -0500
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Jan 26 16:26:43 2016 +0000

    libxl: tidy libxl_get_scheduler() according to CODING_STYLE
    
    To more closely follow the guidelines in CODING_STYLE, store the result
    of xc_sched_id() in the local variable r, and the check the result of
    the call in a separate statement.  Change the type of the output
    parameter given to xc_sched_id() from libxl_scheduler to int to match
    the libxc interface.
    
    Additionally, change the error log statement to more accurately reflect
    the failure.  This is the only functional change introduced by this
    patch.
    
    Suggested-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Signed-off-by: Chester Lin <czylin@xxxxxxxxxxxx>
    Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxl/libxl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 2bde0f5..52fefc0 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -5580,10 +5580,12 @@ out:
 
 libxl_scheduler libxl_get_scheduler(libxl_ctx *ctx)
 {
-    libxl_scheduler sched, ret;
+    int r, sched;
+
     GC_INIT(ctx);
-    if ((ret = xc_sched_id(ctx->xch, (int *)&sched)) != 0) {
-        LOGE(ERROR, "getting domain info list");
+    r = xc_sched_id(ctx->xch, &sched);
+    if (r != 0) {
+        LOGE(ERROR, "getting current scheduler id");
         return ERROR_FAIL;
         GC_FREE;
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.