[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xenstore: expanding_buffer variables are supposed to be static. Apart



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1196877373 0
# Node ID 8ba08f2244b29ec2a1436467b4d5dc30e770accb
# Parent  46af6ec3ae4e308387fdcccfeb9300374255e4fc
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@xxxxxxxxxx>
---
 tools/xenstore/xenstore_client.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 46af6ec3ae4e -r 8ba08f2244b2 tools/xenstore/xenstore_client.c
--- a/tools/xenstore/xenstore_client.c  Wed Dec 05 17:28:59 2007 +0000
+++ b/tools/xenstore/xenstore_client.c  Wed Dec 05 17:56:13 2007 +0000
@@ -138,7 +138,7 @@ perform(int optind, int argc, char **arg
 {
     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 **arg
        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);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.