From: Keir Fraser Date: Wed, 5 Dec 2007 17:56:13 +0000 (+0000) Subject: xenstore: expanding_buffer variables are supposed to be static. Apart X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14659 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3d87f3ac6c4aeffd0e93cacd8956474c194b6989;p=xen.git xenstore: expanding_buffer variables are supposed to be static. Apart from anything else, this was guaranteeing they were initialised. Signed-off-by: Keir Fraser --- diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c index 0f36356233..e4c18ae8e9 100644 --- a/tools/xenstore/xenstore_client.c +++ b/tools/xenstore/xenstore_client.c @@ -138,7 +138,7 @@ perform(int optind, int argc, char **argv, struct xs_handle *xsh, { while (optind < argc) { #if defined(CLIENT_read) - struct expanding_buffer ebuf; + static struct expanding_buffer ebuf; unsigned len; char *val = xs_read(xsh, xth, argv[optind], &len); if (val == NULL) { @@ -151,7 +151,7 @@ perform(int optind, int argc, char **argv, struct xs_handle *xsh, free(val); optind++; #elif defined(CLIENT_write) - struct expanding_buffer ebuf; + static struct expanding_buffer ebuf; char *val_spec = argv[optind + 1]; unsigned len; expanding_buffer_ensure(&ebuf, strlen(val_spec)+1);