ia64/xen-unstable

changeset 16540:8ba08f2244b2

xenstore: expanding_buffer variables are supposed to be static. Apart
from anything else, this was guaranteeing they were initialised.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 05 17:56:13 2007 +0000 (2007-12-05)
parents 46af6ec3ae4e
children 90f02ca76244
files tools/xenstore/xenstore_client.c
line diff
     1.1 --- a/tools/xenstore/xenstore_client.c	Wed Dec 05 17:28:59 2007 +0000
     1.2 +++ b/tools/xenstore/xenstore_client.c	Wed Dec 05 17:56:13 2007 +0000
     1.3 @@ -138,7 +138,7 @@ perform(int optind, int argc, char **arg
     1.4  {
     1.5      while (optind < argc) {
     1.6  #if defined(CLIENT_read)
     1.7 -	struct expanding_buffer ebuf;
     1.8 +	static struct expanding_buffer ebuf;
     1.9  	unsigned len;
    1.10  	char *val = xs_read(xsh, xth, argv[optind], &len);
    1.11  	if (val == NULL) {
    1.12 @@ -151,7 +151,7 @@ perform(int optind, int argc, char **arg
    1.13  	free(val);
    1.14  	optind++;
    1.15  #elif defined(CLIENT_write)
    1.16 -	struct expanding_buffer ebuf;
    1.17 +	static struct expanding_buffer ebuf;
    1.18  	char *val_spec = argv[optind + 1];
    1.19  	unsigned len;
    1.20  	expanding_buffer_ensure(&ebuf, strlen(val_spec)+1);