From patchwork Thu Aug 23 18:55:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 1368781 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 06C643FC66 for ; Thu, 23 Aug 2012 18:57:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934265Ab2HWSzz (ORCPT ); Thu, 23 Aug 2012 14:55:55 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:37344 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934224Ab2HWSzw (ORCPT ); Thu, 23 Aug 2012 14:55:52 -0400 Received: by mail-iy0-f174.google.com with SMTP id o24so1810492ial.19 for ; Thu, 23 Aug 2012 11:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Vu9kL6n4LiBbKJ1rX0U9OCZgKE4BZgyhO+4206cZjFo=; b=FQQsENigHt7kkAvcGL3nXs4sJbbI6ZBvw/HUiTQn7qY4l/QLmCY4vO/4vEsR7Qiswp lhwpmomZSxIwPTLQq34NoyUvYzuxIWBRbfa1AQ98Jdw9gXnLboslDrvPsmEXs+B2qaB/ Ne9uOeRjgxGn6w+jE5Jlik/Tdt3neFVd99C4N5Ij7MHrnpNhT4J/MYgVBtN6UgfWR32e krdmhQgchlxjggYebpOPpCwA7zhvfD+bMe9wOZ3gFZwQC8MalExMtGLNrpBfIzhH5NMM uSKhtPLBfsAXQQqQjfg5aRs4DgvcH5WVO1Lhc/ci8CvoRtYBKXgP39HDHRz2NyUsn5tU J/HQ== Received: by 10.42.96.129 with SMTP id j1mr2210466icn.54.1345748152351; Thu, 23 Aug 2012 11:55:52 -0700 (PDT) Received: from localhost.localdomain (modemcable118.38-22-96.mc.videotron.ca. [96.22.38.118]) by mx.google.com with ESMTPS id ul4sm16907igb.15.2012.08.23.11.55.50 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 11:55:51 -0700 (PDT) From: Benjamin Poirier To: Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Randy Dunlap , Borislav Petkov , "Yann E. MORIN" , Jean Sacren , Arnaud Lacombe , Lucas De Marchi , Davidlohr Bueso , Wang YanQing , Paul Gortmaker , Cheng Renquan Subject: [PATCH v2 1/6] menuconfig: Remove superfluous conditionnal Date: Thu, 23 Aug 2012 14:55:03 -0400 Message-Id: <1345748108-12206-2-git-send-email-bpoirier@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1345748108-12206-1-git-send-email-bpoirier@suse.de> References: <1345748108-12206-1-git-send-email-bpoirier@suse.de> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 --- 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; }