Skip to contentSkip to conversation

tools/xenstore: fix unsigned < 0 compare in xenstore_control

PATCH In review Juergen Gross 2 participants 2 messages Jan 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")

---
 tools/xenstore/xenstore_control.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/xenstore/xenstore_control.c +2 -2
index 6031f216c7..0c95cf767c 100644
@@ -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"
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Juergen Gross

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")

Thanks - I'll get this committed momentarily.