summaryrefslogtreecommitdiff
path: root/scripts/kconfig/lxdialog/textbox.c
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@suse.de>2012-08-23 22:55:03 +0400
committerMichal Marek <mmarek@suse.cz>2012-09-27 20:08:13 +0400
commitb9d29abd98a2bbeb3a6c49c1607348c92bc80105 (patch)
treeee4016e1a8184725dc4765b44fc439c973daea97 /scripts/kconfig/lxdialog/textbox.c
parent1d52a4a79188e5567b6c55f67e20a4f1043d10d3 (diff)
downloadlinux-b9d29abd98a2bbeb3a6c49c1607348c92bc80105.tar.xz
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/lxdialog/textbox.c')
-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)
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 {
@@ -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;
}