menuconfig: Remove superfluous conditionnal
authorBenjamin Poirier <bpoirier@suse.de>
Thu, 23 Aug 2012 18:55:03 +0000 (14:55 -0400)
committerMichal Marek <mmarek@suse.cz>
Thu, 27 Sep 2012 16:08:13 +0000 (18:08 +0200)
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>
scripts/kconfig/lxdialog/textbox.c

index 4e5de60a0c0d35765d1cfb8f67a06c852c892e8a..264a2b9f320c34e4ef38bc4aa6cf460601dd48fd 100644 (file)
@@ -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;
 }