From patchwork Mon Jul 30 19:22:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 1255951 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 0E1BF3FCC5 for ; Mon, 30 Jul 2012 19:24:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754786Ab2G3TW5 (ORCPT ); Mon, 30 Jul 2012 15:22:57 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:47581 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753487Ab2G3TWz (ORCPT ); Mon, 30 Jul 2012 15:22:55 -0400 Received: by yhmm54 with SMTP id m54so5227539yhm.19 for ; Mon, 30 Jul 2012 12:22:55 -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=bHoVZ6by2IrGMsohsebE6jck9CHVjFiHa923qmKCPYFV68M0yVN3tcGTl1U1w7D3T2 rD1622Pt80eCNwSWT7rih72Y//9qHpLiE8GK9xo267h/jXaq84EjpiGKPyxgjTtrCjR2 c7qdsq8SX26lu0eFoYu78BYW7LsTOm8qLVN71j9WWBzegD780H0+UMMvAF2DYsnF0++C us16EnZagUI71uvr9zMueUcKsTXLVPDyaLRKaztfpg7RZSsETFtM2c/iWXZ4Z0BRy+iQ TTRIW4EjQOEqBu5kUOZE/4QrbTtKK4V24EnWaMO7oChwq3dd1V3gs7cEGcEWHGwcY0Ek lxFQ== Received: by 10.50.158.163 with SMTP id wv3mr132406igb.24.1343676174732; Mon, 30 Jul 2012 12:22:54 -0700 (PDT) Received: from localhost.localdomain (modemcable118.38-22-96.mc.videotron.ca. [96.22.38.118]) by mx.google.com with ESMTPS id dk7sm15471252igb.10.2012.07.30.12.22.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jul 2012 12:22:53 -0700 (PDT) From: Benjamin Poirier To: Michal Marek Cc: Lucas De Marchi , Arnaud Lacombe , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Randy Dunlap Subject: [PATCH 1/6] menuconfig: Remove superfluous conditionnal Date: Mon, 30 Jul 2012 15:22:05 -0400 Message-Id: <1343676130-29770-2-git-send-email-bpoirier@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1343676130-29770-1-git-send-email-bpoirier@suse.de> References: <1343676130-29770-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; }