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

Peter Hutterer peter.hutterer at who-t.net
Tue Jul 28 23:15:11 PDT 2015


On Tue, Jul 28, 2015 at 05:53:48PM +0200, Thomas Klausner wrote:
> From: Matthew Green <mrg at NetBSD.org>
> 
> Signed-off-by: Thomas Klausner <wiz at NetBSD.org>

pushed, thanks

Cheers,
   Peter

> ---
>  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
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list