[2/2] xmllite: Constify pointers in arrays that hold const data.

Dmitry Timoshkov dmitry at baikal.ru
Mon Dec 30 03:17:08 CST 2013


This is just an example and a hint for anyone wishing to make more
data in arrays const.
---
 dlls/xmllite/reader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c
index cfd54d4..9fe48bd 100644
--- a/dlls/xmllite/reader.c
+++ b/dlls/xmllite/reader.c
@@ -102,7 +102,7 @@ static const WCHAR piW[] = {'<','?',0};
 
 static const char *debugstr_nodetype(XmlNodeType nodetype)
 {
-    static const char* type_names[] =
+    static const char * const type_names[] =
     {
         "None",
         "Element",
@@ -132,7 +132,7 @@ static const char *debugstr_nodetype(XmlNodeType nodetype)
 
 static const char *debugstr_prop(XmlReaderProperty prop)
 {
-    static const char* prop_names[] =
+    static const char * const prop_names[] =
     {
         "MultiLanguage",
         "ConformanceLevel",
-- 
1.8.5.2




More information about the wine-patches mailing list