=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: cmd: Reduce the scope of a global variable.

Alexandre Julliard julliard at winehq.org
Tue Nov 29 14:20:39 CST 2011


Module: wine
Branch: master
Commit: 1a8df977ac2cea65ba70ccea588f2c7f2b00c0c0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1a8df977ac2cea65ba70ccea588f2c7f2b00c0c0

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Nov 29 14:39:27 2011 +0100

cmd: Reduce the scope of a global variable.

---

 programs/cmd/wcmdmain.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 32a457e..c3c71a9 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -45,16 +45,17 @@ WCHAR quals[MAX_PATH], param1[MAXSTRING], param2[MAXSTRING];
 BATCH_CONTEXT *context = NULL;
 extern struct env_stack *pushd_directories;
 static const WCHAR *pagedMessage = NULL;
-static char  *output_bufA = NULL;
-#define MAX_WRITECONSOLE_SIZE 65535
 static BOOL unicodePipes = FALSE;
 
+#define MAX_WRITECONSOLE_SIZE 65535
+
 /*
  * Returns a buffer for reading from/writing to file
  * Never freed
  */
 static char *get_file_buffer(void)
 {
+    static char *output_bufA = NULL;
     if (!output_bufA) {
         output_bufA = HeapAlloc(GetProcessHeap(), 0, MAX_WRITECONSOLE_SIZE);
         if (!output_bufA)




More information about the wine-cvs mailing list