[PATCH 7/7] Remove unnecessary variable rtrn in XkbKeysymText

Alan Coopersmith alan.coopersmith at oracle.com
Tue Nov 1 15:42:22 PDT 2011


Also removes even more unnecessary use of variable assignment inside
function arguments.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 xkb/xkbtext.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index 885beb7..cd19000 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -334,12 +334,12 @@ static char *buf;
 char *
 XkbKeysymText(KeySym sym,unsigned format)
 {
-static char buf[32],*rtrn;
+static char buf[32];
 
     if (sym==NoSymbol)
-	 strcpy(rtrn=buf,"NoSymbol");
-    else snprintf(rtrn=buf, sizeof(buf), "0x%lx", (long)sym);
-    return rtrn;
+	 strcpy(buf,"NoSymbol");
+    else snprintf(buf, sizeof(buf), "0x%lx", (long)sym);
+    return buf;
 }
 
 char *
-- 
1.7.3.2



More information about the xorg-devel mailing list