From cdbfa0b7ebe691c2590ea5b41d5288059f2fa9b0 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 30 Dec 2013 09:25:57 -0500 Subject: [PATCH] xenstore-watch: initialize token passed to xen Xen will read it till the terminating NUL. Plus return 0 on exit and define main as returning int. --- dispvm/xenstore-watch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dispvm/xenstore-watch.c b/dispvm/xenstore-watch.c index 2e622d8b..666a31f8 100644 --- a/dispvm/xenstore-watch.c +++ b/dispvm/xenstore-watch.c @@ -2,12 +2,12 @@ #include #include #include -main(int argc, char **argv) +int main(int argc, char **argv) { struct xs_handle *xs; unsigned int count; char **vec; - char dummy; + char dummy = 0; if (argc != 2) { fprintf(stderr, "usage: %s xenstore_path\n", argv[0]); exit(1); @@ -25,4 +25,5 @@ main(int argc, char **argv) free(vec); vec = xs_read_watch(xs, &count); free(vec); + return 0; }