From patchwork Sun Jul 10 07:27:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 960742 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6A7S3xF027625 for ; Sun, 10 Jul 2011 07:28:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755445Ab1GJH1o (ORCPT ); Sun, 10 Jul 2011 03:27:44 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:33369 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755368Ab1GJH1l (ORCPT ); Sun, 10 Jul 2011 03:27:41 -0400 Received: by iyb12 with SMTP id 12so2844837iyb.19 for ; Sun, 10 Jul 2011 00:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=qE37Ep5mGnlgITvYxdtLCZzZKvby0Z+hc0IrRZHWiDo=; b=u7+igYMtYJyfZHm4v35iTjbSI0tAIEVMvj/kTDT9KDeyvparTO6/ZAoI5KCg4TslbX sF9oPVqWcHJDFelGIFlETyFBOPXH27HjEQTIUysjvJ/TowLjVfmBe3wmAZjuJy7oanB8 JA0hxnDjMLGoKSSSoeukLShsPjeX1RCOcPiCM= Received: by 10.42.189.199 with SMTP id df7mr3191416icb.274.1310282860633; Sun, 10 Jul 2011 00:27:40 -0700 (PDT) Received: from localhost.localdomain ([184.175.3.95]) by mx.google.com with ESMTPS id e1sm2330577icv.8.2011.07.10.00.27.39 (version=SSLv3 cipher=OTHER); Sun, 10 Jul 2011 00:27:40 -0700 (PDT) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org, Michal Marek Cc: linux-kernel@vger.kernel.org, Arnaud Lacombe , Nir Tzachar Subject: [PATCH] kconfig/nconf: remove useless conditionnal Date: Sun, 10 Jul 2011 03:27:33 -0400 Message-Id: <1310282853-14550-1-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.3.4.574.g608b.dirty Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 10 Jul 2011 07:28:03 +0000 (UTC) After the test if (!submenu || ...) continue; the variable `submenu' can _not_ be NULL, so do not test for this situation. Cc: Nir Tzachar Signed-off-by: Arnaud Lacombe --- scripts/kconfig/nconf.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index eb9e49d..6b189c8 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -1155,10 +1155,7 @@ static void conf(struct menu *menu) active_menu = (struct menu *)item_data(); if (!submenu || !menu_is_visible(submenu)) continue; - if (submenu) - sym = submenu->sym; - else - sym = NULL; + sym = submenu->sym; switch (res) { case ' ':