aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@suse.de>2012-08-23 14:55:03 -0400
committerMichal Marek <mmarek@suse.cz>2012-09-27 12:08:13 -0400
commitb9d29abd98a2bbeb3a6c49c1607348c92bc80105 (patch)
treeee4016e1a8184725dc4765b44fc439c973daea97 /scripts/kconfig
parent1d52a4a79188e5567b6c55f67e20a4f1043d10d3 (diff)
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: Benjamin Poirier <bpoirier@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/lxdialog/textbox.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
index 4e5de60a0c0d..264a2b9f320c 100644
--- a/scripts/kconfig/lxdialog/textbox.c
+++ b/scripts/kconfig/lxdialog/textbox.c
@@ -357,10 +357,8 @@ static char *get_line(void)
357 end_reached = 0; 357 end_reached = 0;
358 while (*page != '\n') { 358 while (*page != '\n') {
359 if (*page == '\0') { 359 if (*page == '\0') {
360 if (!end_reached) { 360 end_reached = 1;
361 end_reached = 1; 361 break;
362 break;
363 }
364 } else if (i < MAX_LEN) 362 } else if (i < MAX_LEN)
365 line[i++] = *(page++); 363 line[i++] = *(page++);
366 else { 364 else {
@@ -373,7 +371,7 @@ static char *get_line(void)
373 if (i <= MAX_LEN) 371 if (i <= MAX_LEN)
374 line[i] = '\0'; 372 line[i] = '\0';
375 if (!end_reached) 373 if (!end_reached)
376 page++; /* move pass '\n' */ 374 page++; /* move past '\n' */
377 375
378 return line; 376 return line;
379} 377}