* [PATCH] tools/xenstore: fix unsigned < 0 compare in xenstore_control
@ 2021-01-22 6:08 Juergen Gross
2021-01-22 10:44 ` Andrew Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2021-01-22 6:08 UTC (permalink / raw)
To: xen-devel; +Cc: Juergen Gross, Ian Jackson, Wei Liu, Andrew Cooper
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@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
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"
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/xenstore: fix unsigned < 0 compare in xenstore_control
2021-01-22 6:08 [PATCH] tools/xenstore: fix unsigned < 0 compare in xenstore_control Juergen Gross
@ 2021-01-22 10:44 ` Andrew Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2021-01-22 10:44 UTC (permalink / raw)
To: Juergen Gross, xen-devel; +Cc: Ian Jackson, Wei Liu
On 22/01/2021 06:08, Juergen Gross wrote:
> 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@citrix.com>
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Thanks - I'll get this committed momentarily.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-22 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 6:08 [PATCH] tools/xenstore: fix unsigned < 0 compare in xenstore_control Juergen Gross
2021-01-22 10:44 ` Andrew Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).