Skip to content

Commit

Permalink
menuconfig: Remove superfluous conditionnal
Browse files Browse the repository at this point in the history
Because end_reached is set to 0 before the loop, the test "!end_reached" is
always true and can be removed. This structure was perhaps copied from the
similar one in back_lines().

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Benjamin Poirier authored and Michal Marek committed Sep 27, 2012
1 parent 1d52a4a commit b9d29ab
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/kconfig/lxdialog/textbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,8 @@ static char *get_line(void)
end_reached = 0;
while (*page != '\n') {
if (*page == '\0') {
if (!end_reached) {
end_reached = 1;
break;
}
end_reached = 1;
break;
} else if (i < MAX_LEN)
line[i++] = *(page++);
else {
Expand All @@ -373,7 +371,7 @@ static char *get_line(void)
if (i <= MAX_LEN)
line[i] = '\0';
if (!end_reached)
page++; /* move pass '\n' */
page++; /* move past '\n' */

return line;
}
Expand Down

0 comments on commit b9d29ab

Please sign in to comment.