Commit b9d29abd authored by Benjamin Poirier's avatar Benjamin Poirier Committed by Michal Marek

menuconfig: Remove superfluous conditionnal

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: default avatarBenjamin Poirier <bpoirier@suse.de>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 1d52a4a7
...@@ -357,10 +357,8 @@ static char *get_line(void) ...@@ -357,10 +357,8 @@ static char *get_line(void)
end_reached = 0; end_reached = 0;
while (*page != '\n') { while (*page != '\n') {
if (*page == '\0') { if (*page == '\0') {
if (!end_reached) { end_reached = 1;
end_reached = 1; break;
break;
}
} else if (i < MAX_LEN) } else if (i < MAX_LEN)
line[i++] = *(page++); line[i++] = *(page++);
else { else {
...@@ -373,7 +371,7 @@ static char *get_line(void) ...@@ -373,7 +371,7 @@ static char *get_line(void)
if (i <= MAX_LEN) if (i <= MAX_LEN)
line[i] = '\0'; line[i] = '\0';
if (!end_reached) if (!end_reached)
page++; /* move pass '\n' */ page++; /* move past '\n' */
return line; return line;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment