[PATCH:xkbcomp] Adjust a NUL-string assignment to avoid const issues.

Thomas Klausner wiz at NetBSD.org
Tue Jul 28 08:53:48 PDT 2015


From: Matthew Green <mrg at NetBSD.org>

Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
---
 expr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/expr.c b/expr.c
index e0f957c..841ab07 100644
--- a/expr.c
+++ b/expr.c
@@ -729,8 +729,8 @@ ExprResolveString(ExprDef * expr,
         val_rtrn->str = XkbAtomGetString(NULL, expr->value.str);
         if (val_rtrn->str == NULL)
         {
-            static const char *empty = "";
-            val_rtrn->str = empty;
+            static char empty_char = '\0';
+            val_rtrn->str = &empty_char;
         }
         return True;
     case ExprIdent:
-- 
2.4.6



More information about the xorg-devel mailing list