From e11ff718ac4bc10539dc31899cc75a6feb78467e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 31 Jul 2005 22:06:38 +0000 Subject: shrink the flag setting by reversing the operation --- console-tools/dumpkmap.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'console-tools') diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index 590ba4d..fe96206 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c @@ -54,17 +54,11 @@ int dumpkmap_main(int argc, char **argv) write(1, magic, 7); + /* Here we want to set everything to 0 except for indexes: + * [0-2] [4-6] [8-10] [12] */ memset(flags, 0x00, MAX_NR_KEYMAPS); - flags[0] = 1; - flags[1] = 1; - flags[2] = 1; - flags[4] = 1; - flags[5] = 1; - flags[6] = 1; - flags[8] = 1; - flags[9] = 1; - flags[10] = 1; - flags[12] = 1; + memset(flags, 0x01, 13); + flags[3] = flags[7] = flags[11] = 0; /* dump flags */ write(1, flags, MAX_NR_KEYMAPS); -- cgit v1.1