From: Benjamin Poirier <bpoirier@suse.de>
To: Michal Marek <mmarek@suse.cz>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>,
Arnaud Lacombe <lacombar@gmail.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Randy Dunlap <rdunlap@xenotime.net>
Subject: [PATCH 1/6] menuconfig: Remove superfluous conditionnal
Date: Mon, 30 Jul 2012 15:22:05 -0400 [thread overview]
Message-ID: <1343676130-29770-2-git-send-email-bpoirier@suse.de> (raw)
In-Reply-To: <1343676130-29770-1-git-send-email-bpoirier@suse.de>
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>
---
scripts/kconfig/lxdialog/textbox.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
index 4e5de60..264a2b9 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;
}
--
1.7.7
next prev parent reply other threads:[~2012-07-30 19:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 19:22 [PATCH 0/6] menuconfig: jump to search results Benjamin Poirier
2012-07-30 19:22 ` Benjamin Poirier [this message]
2012-07-30 19:22 ` [PATCH 2/6] menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses Benjamin Poirier
2012-07-30 19:22 ` [PATCH 3/6] menuconfig: Extend dialog_textbox so that it can return to a scrolled position Benjamin Poirier
2012-07-30 19:22 ` [PATCH 4/6] menuconfig: Add jump keys to search results Benjamin Poirier
2012-07-30 19:22 ` [PATCH 5/6] menuconfig: Do not open code textbox scroll up/down Benjamin Poirier
2012-07-30 19:22 ` [PATCH 6/6] menuconfig: Assign jump keys per-page instead of globally Benjamin Poirier
2012-07-30 19:58 ` [PATCH 0/6] menuconfig: jump to search results Borislav Petkov
2012-07-30 20:22 ` Benjamin Poirier
2012-07-31 7:57 ` Borislav Petkov
2012-07-31 13:17 ` Benjamin Poirier
2012-08-02 13:32 ` Borislav Petkov
2012-08-02 14:18 ` Benjamin Poirier
2012-08-02 21:38 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343676130-29770-2-git-send-email-bpoirier@suse.de \
--to=bpoirier@suse.de \
--cc=lacombar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@profusion.mobi \
--cc=mmarek@suse.cz \
--cc=rdunlap@xenotime.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®