=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: xmllite: Constify some character strings.

Alexandre Julliard julliard at winehq.org
Thu Dec 19 12:43:27 CST 2013


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Wed Dec 18 23:14:16 2013 +0100

xmllite: Constify some character strings.

---

 dlls/xmllite/reader.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c
index 9ca7370..0ecb593 100644
--- a/dlls/xmllite/reader.c
+++ b/dlls/xmllite/reader.c
@@ -729,8 +729,8 @@ static void readerinput_grow(xmlreaderinput *readerinput, int length)
 
 static inline BOOL readerinput_is_utf8(xmlreaderinput *readerinput)
 {
-    static char startA[] = {'<','?'};
-    static char commentA[] = {'<','!'};
+    static const char startA[] = {'<','?'};
+    static const char commentA[] = {'<','!'};
     encoded_buffer *buffer = &readerinput->buffer->encoded;
     unsigned char *ptr = (unsigned char*)buffer->data;
 
@@ -749,10 +749,10 @@ static inline BOOL readerinput_is_utf8(xmlreaderinput *readerinput)
 static HRESULT readerinput_detectencoding(xmlreaderinput *readerinput, xml_encoding *enc)
 {
     encoded_buffer *buffer = &readerinput->buffer->encoded;
-    static WCHAR startW[] = {'<','?'};
-    static WCHAR commentW[] = {'<','!'};
-    static char utf8bom[] = {0xef,0xbb,0xbf};
-    static char utf16lebom[] = {0xff,0xfe};
+    static const WCHAR startW[] = {'<','?'};
+    static const WCHAR commentW[] = {'<','!'};
+    static const char utf8bom[] = {0xef,0xbb,0xbf};
+    static const char utf16lebom[] = {0xff,0xfe};
 
     *enc = XmlEncoding_Unknown;
 




More information about the wine-cvs mailing list