aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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}