Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp27962imm; Tue, 16 Oct 2018 17:12:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV63YVUkVwJqdXMcqXNlQ3FavXRGIclMuUeDItWJTUuWN+829dP71TE7t8WOya9Kw5thJ/dLZ X-Received: by 2002:a62:85cb:: with SMTP id m72-v6mr24092824pfk.173.1539735127039; Tue, 16 Oct 2018 17:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539735127; cv=none; d=google.com; s=arc-20160816; b=QiekyhPK3XLZ1b9/LTkwdu4iH6KO+TTPE7RspwPJKmxZD4oJM0yc6PWmU7xrjbanbe KWRlfIaxPwure3UDbYUQ9qB2AyeubZcIVoIriXF0QXPX7ct6rdq/6KaEny2LTkbHjA/D RQOB/mBfR9EBnzz6oH1Fnc88i16ol2V9ETqTIvwynwe5zeT7+gwNxcnQj83Dy+QCX9qI iDfBQ7VPHI2/pvMRlth15QQRBpinF5B0yQztNBKkL1OJIaRk76fnEnR8DI+CyoHl0iJd VxFFpXaFxmvfSNUHjuKw/ptvr17vYOkvDwokkDLiGhHp5R8Zqzp2nqAZ6Xg+v8gBfvj/ fMGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=Du6wml9VVnou4jAkLBGM3hlzod6FF9zbSLCzf+JCveM=; b=Uzxpnz9MwgN0mX+7hUqSnNlZQtWUzqn9bLH6I4HZR00rqYkNXiMy9DrEKOUuOkriqw fVwVCgLhKK+LMZ8/55zQ0LonI3Ay3zLGknOeU3y3UqxHRpC+zIbRH3Fb4X5Ss1l125D+ lZGGFPptjEhEXyNfOOlZ5qfGWssOLieJn23YNnQR4Yd/LUaIZWYFdGQaMiF1Z2lvhoAe LvIDjIsIv7S+Bq8MeeFjCLzrZZgJpt1bC4Cq3WayOe85H6l+WkZaqYCKg3sv7I73IXEW ysFknIlUJW0ljPGs5ANRIGirCAtiDEeYdrHsOzI8tgYma4PKMnba4ZEvwSTO29HuSqU/ +4cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fQwfadr9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9-v6si15908560pfe.29.2018.10.16.17.11.49; Tue, 16 Oct 2018 17:12:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fQwfadr9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727524AbeJQICM (ORCPT + 99 others); Wed, 17 Oct 2018 04:02:12 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:38598 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727171AbeJQICM (ORCPT ); Wed, 17 Oct 2018 04:02:12 -0400 Received: by mail-qk1-f195.google.com with SMTP id 204-v6so15368888qkd.5; Tue, 16 Oct 2018 17:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:user-agent; bh=Du6wml9VVnou4jAkLBGM3hlzod6FF9zbSLCzf+JCveM=; b=fQwfadr91a5AmyHL08cXCsMHfp0fqJCUcmYZiXoprz3VziZ5qrrfnU5tEQJYzMh+HK /X06MimgPOluZywapGGBft4kszDXVnOfsgbQNNTxLhZ2dQgzoJGcWTJbnwNuCC/x/Vwc eKsIkHXneVtPRYGuQrtcBbaqSXnNDiVoMvsvpDjvukqUEAK0FLmBpFjyPioRX857h4jP 2Lzqf+3SUYN/drc2FJWI86kFFXA3fl/fXOy24COSX5fACIUOVxHXsk0NMTGIdx1rlbn/ fSqWqh8r5xY7ASkR3udc4qN4APAvX2qVF8vSrgojwOFUItzKGJIywZGFAyBSEQgFdmDv 6M2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=Du6wml9VVnou4jAkLBGM3hlzod6FF9zbSLCzf+JCveM=; b=D4GB1H6KszFK92T/8nCdD0L18AUhTo1bidV8RlF4xH5q6QjlX7HJN2DhwQuPZETcno KlmX6DRP8m7zMKWjQNwvNb43PRqu+jDRBr0Ar1KPtS+I4LLt2YQE7YkvSa9yi5fTN7NF vYTGMYzFVnFN8p6OqtDMRWj5nJ+m69CUiJX4GAdwgZBG9omUeV+lpLeFLc4OV/9Uo/Ch EP10+sNUc7TV0nQMcRga2gjyuBUYyF3B4fgX8DT805oCgFEbcQovSOV3yug5VAXktgNy 3JGoPGLT5RUOjdRYe4/d0dZRFmHAZ5V5cO7Yx33RRNiEcWnEXQdYkv56hoY0VAIZmYYr 0G9A== X-Gm-Message-State: ABuFfojADJwStt81tNPCl15XjMwgWwgFKJRUPaWeOTa0lLlvCOsH1UR1 SOrLmxxo00+Ir8gXkPHJOiVYCaRQ X-Received: by 2002:a37:2d46:: with SMTP id t67-v6mr22525808qkh.351.1539734957923; Tue, 16 Oct 2018 17:09:17 -0700 (PDT) Received: from WindFlash ([179.159.21.48]) by smtp.gmail.com with ESMTPSA id a72-v6sm8297662qkc.19.2018.10.16.17.09.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Oct 2018 17:09:17 -0700 (PDT) Date: Tue, 16 Oct 2018 21:09:12 -0300 From: Leonardo =?utf-8?B?QnLDoXM=?= To: lkcamp@lists.libreplanetbr.org Cc: Matthew Wilcox , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH 3/4] kbuild: Removes unnecessary shadowed local variable and optimize testing. Message-ID: <20181017000912.GA21339@WindFlash> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Removes an unnecessary shadowed local variable (start). Optimize test of isdigit: - If isalpha returns true, isdigit will return false, so no need to test. Signed-off-by: Leonardo BrĂ¡s --- scripts/asn1_compiler.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c index c146020fc783..08bb6e5fd6ad 100644 --- a/scripts/asn1_compiler.c +++ b/scripts/asn1_compiler.c @@ -413,7 +413,7 @@ static void tokenise(char *buffer, char *end) /* Handle string tokens */ if (isalpha(*p)) { - const char **dir, *start = p; + const char **dir; /* Can be a directive, type name or element * name. Find the end of the name. @@ -454,10 +454,9 @@ static void tokenise(char *buffer, char *end) tokens[tix++].token_type = TOKEN_TYPE_NAME; continue; - } + } else if (isdigit(*p)) { + /* Handle numbers */ - /* Handle numbers */ - if (isdigit(*p)) { /* Find the end of the number */ q = p + 1; while (q < nl && (isdigit(*q))) -- 2.19.1