diff options
author | Ran Benita <ran234@gmail.com> | 2012-10-18 22:55:17 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-10-18 22:55:17 +0200 |
commit | e6946ae2c59a878e838fe777b50dad695b63e6bb (patch) | |
tree | ba44a8001fa341bdb097db03d292db9f309836d1 /src/xkbcomp/compat.c | |
parent | 714e95e1445ab0d37b3970bebdd9af09d7eaf923 (diff) | |
download | libxkbcommon-e6946ae2c59a878e838fe777b50dad695b63e6bb.tar.gz libxkbcommon-e6946ae2c59a878e838fe777b50dad695b63e6bb.tar.bz2 libxkbcommon-e6946ae2c59a878e838fe777b50dad695b63e6bb.zip |
Remove a couple more uses of static char buffers
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/xkbcomp/compat.c')
-rw-r--r-- | src/xkbcomp/compat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c index 9aca92f..fb654a6 100644 --- a/src/xkbcomp/compat.c +++ b/src/xkbcomp/compat.c @@ -271,15 +271,16 @@ typedef struct { static const char * siText(SymInterpInfo *si, CompatInfo *info) { - static char buf[128]; + char *buf = xkb_context_get_buffer(info->keymap->ctx, 128); if (si == &info->dflt) return "default"; - snprintf(buf, sizeof(buf), "%s+%s(%s)", + snprintf(buf, 128, "%s+%s(%s)", KeysymText(info->keymap->ctx, si->interp.sym), SIMatchText(si->interp.match), ModMaskText(info->keymap, si->interp.mods)); + return buf; } |