From c7bf3687806c2d6fa91851d64966fcc705330e92 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 2 Mar 2012 22:36:32 +0200 Subject: [PATCH] Make the sections array local to the keymap compiling function Signed-off-by: Ran Benita --- src/xkbcomp/keymap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c index 7906b2b..b610431 100644 --- a/src/xkbcomp/keymap.c +++ b/src/xkbcomp/keymap.c @@ -39,8 +39,6 @@ #define SYMBOLS 4 #define MAX_SECTIONS 5 -static XkbFile *sections[MAX_SECTIONS]; - /** * Compile the given file and store the output in xkb. * @param file A list of XkbFiles, each denoting one type (e.g. @@ -55,8 +53,9 @@ CompileKeymap(XkbFile *file, struct xkb_desc * xkb, unsigned merge) unsigned mainType; char *mainName; LEDInfo *unbound = NULL; + XkbFile *sections[MAX_SECTIONS]; - memset(sections, 0, MAX_SECTIONS * sizeof(XkbFile *)); + memset(sections, 0, sizeof(sections)); mainType = file->type; mainName = file->name; switch (mainType) -- 2.7.4