summaryrefslogtreecommitdiff
path: root/console-tools/dumpkmap.c
diff options
context:
space:
mode:
authorMike Frysinger2005-07-31 20:51:58 +0000
committerMike Frysinger2005-07-31 20:51:58 +0000
commit08c20362f5c0103e27ccc1cda03a41a697e587b0 (patch)
tree61356970c18979fdfb16ae5888b19f54a76a2ca4 /console-tools/dumpkmap.c
parentde7f9b733247e212c004fd9804a8a83007ed8930 (diff)
downloadbusybox-08c20362f5c0103e27ccc1cda03a41a697e587b0.zip
busybox-08c20362f5c0103e27ccc1cda03a41a697e587b0.tar.gz
replace for loops with one function call
Diffstat (limited to 'console-tools/dumpkmap.c')
-rw-r--r--console-tools/dumpkmap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c
index 61768fe..590ba4d 100644
--- a/console-tools/dumpkmap.c
+++ b/console-tools/dumpkmap.c
@@ -54,8 +54,7 @@ int dumpkmap_main(int argc, char **argv)
write(1, magic, 7);
- for (i=0; i < MAX_NR_KEYMAPS; i++)
- flags[i] = 0;
+ memset(flags, 0x00, MAX_NR_KEYMAPS);
flags[0] = 1;
flags[1] = 1;
flags[2] = 1;
@@ -68,8 +67,7 @@ int dumpkmap_main(int argc, char **argv)
flags[12] = 1;
/* dump flags */
- for (i = 0; i < MAX_NR_KEYMAPS; i++)
- write(1, &flags[i], 1);
+ write(1, flags, MAX_NR_KEYMAPS);
for (i = 0; i < MAX_NR_KEYMAPS; i++) {
if (flags[i] == 1) {