From 98bb1620f79d1d849dbc66a3143a8d0700c75271 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 31 Jan 2013 16:07:45 +0000 Subject: [PATCH] make one of the xkb functions less stupid SVN revision: 83526 --- src/bin/e_xkb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bin/e_xkb.c b/src/bin/e_xkb.c index e1984da47..74b2426e1 100644 --- a/src/bin/e_xkb.c +++ b/src/bin/e_xkb.c @@ -221,8 +221,12 @@ e_xkb_layout_set(const char *name) EAPI const char * e_xkb_layout_name_reduce(const char *name) { - if ((name) && (strchr(name, '/'))) name = strchr(name, '/') + 1; - return name; + const char *s; + + if (!name) return NULL; + s = strchr(name, '/'); + if (s) s++; + return s; } EAPI void