replace for loops with one function call
This commit is contained in:
parent
de7f9b7332
commit
08c20362f5
@ -54,8 +54,7 @@ int dumpkmap_main(int argc, char **argv)
|
|||||||
|
|
||||||
write(1, magic, 7);
|
write(1, magic, 7);
|
||||||
|
|
||||||
for (i=0; i < MAX_NR_KEYMAPS; i++)
|
memset(flags, 0x00, MAX_NR_KEYMAPS);
|
||||||
flags[i] = 0;
|
|
||||||
flags[0] = 1;
|
flags[0] = 1;
|
||||||
flags[1] = 1;
|
flags[1] = 1;
|
||||||
flags[2] = 1;
|
flags[2] = 1;
|
||||||
@ -68,8 +67,7 @@ int dumpkmap_main(int argc, char **argv)
|
|||||||
flags[12] = 1;
|
flags[12] = 1;
|
||||||
|
|
||||||
/* dump flags */
|
/* dump flags */
|
||||||
for (i = 0; i < MAX_NR_KEYMAPS; i++)
|
write(1, flags, MAX_NR_KEYMAPS);
|
||||||
write(1, &flags[i], 1);
|
|
||||||
|
|
||||||
for (i = 0; i < MAX_NR_KEYMAPS; i++) {
|
for (i = 0; i < MAX_NR_KEYMAPS; i++) {
|
||||||
if (flags[i] == 1) {
|
if (flags[i] == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user