Skip to content

Commit

Permalink
Remove C99 for(int...
Browse files Browse the repository at this point in the history
  • Loading branch information
cknave committed Oct 8, 2017
1 parent f59cfa0 commit c117c3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/kevedit/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ displaymethod * pickdisplay(displaymethod * rootdisplay)

/* More than 1 display method available, user must choose */
int selected = 0;
int i;
do {
char buffer[16];
printf("Select a display method:\n\n");
mydisplay = rootdisplay;
for (int i = 1; i <= num_displays; i++) {
for (i = 1; i <= num_displays; i++) {
printf("[%d] %s\n", i, mydisplay->name);
mydisplay = mydisplay->next;
}
Expand All @@ -176,7 +177,7 @@ displaymethod * pickdisplay(displaymethod * rootdisplay)
} while(selected < 1 || selected > num_displays);

mydisplay = rootdisplay;
for(int i = 1; i < selected; i++) {
for(i = 1; i < selected; i++) {
mydisplay = mydisplay->next;
}
return mydisplay;
Expand Down

0 comments on commit c117c3d

Please sign in to comment.