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

[xen master] tools/xenstore: fix unsigned < 0 compare in xenstore_control



commit a37b50c28e6749186011b333787b1ec4fe21415f
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Fri Jan 22 07:08:57 2021 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Jan 22 11:35:18 2021 +0000

    tools/xenstore: fix unsigned < 0 compare in xenstore_control
    
    Commit 7f97193e6aa858df ("tools/xenstore: add live update command to
    xenstore-control") introduced testing an unsigned value to be less
    than 0. Fix that.
    
    Fixes: 7f97193e6aa858df ("tools/xenstore: add live update command to 
xenstore-control")
    Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/xenstore/xenstore_control.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/xenstore/xenstore_control.c 
b/tools/xenstore/xenstore_control.c
index 6031f216c7..0c95cf767c 100644
--- a/tools/xenstore/xenstore_control.c
+++ b/tools/xenstore/xenstore_control.c
@@ -313,8 +313,8 @@ int main(int argc, char **argv)
     struct xs_handle *xsh;
     char *par = NULL;
     char *ret;
-    unsigned int p, len = 0;
-    int rc = 0;
+    unsigned int p;
+    int rc = 0, len = 0;
 
     if (argc < 2) {
         fprintf(stderr, "Usage:\n"
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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