Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp33824imm; Tue, 18 Sep 2018 16:00:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY8p4ARsuANtfqkIsCRoRyxIiXRlgha5eV81rB0h63pinhc92NZDeTHfW6QqadbMOoQuWai X-Received: by 2002:a63:d002:: with SMTP id z2-v6mr30070211pgf.262.1537311659218; Tue, 18 Sep 2018 16:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537311659; cv=none; d=google.com; s=arc-20160816; b=bo4w6tVNtjO/pvHykwMPgeIOUb2LdewsJYSrnv0UrViOnYId525TtXPrwwDrhKdWgS xA9BOLxplFNbzYStB3H4Df2ggOV6EZNtkZP3AbwT7rPKhVlOQsmwVIvzXVKq913S+yTm xDv2jFRvnd5thVXieSjIL4qAQ2+kzVDCnfZ5zDfkVe0UEDZe6plYiniWJxnzelWsetEZ 9+A/Lv3mGNZYY7KWustBQxTQIbxH07ld5LbtHTHAzp40f2Hy09L18y2qNMGvF5iD8Cnc SROIm349kDT6THmDdBDjmS4NybLMa5zSeEfNvQ2Vn0+9D+DsyPKGaQqgExdlqZae8aMp 9o7w== 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=PMBhSsUTwZQfsvYWSUIflvFWLLu4tkrVGV+SyhSri1Y=; b=h4VilWlvGOl2nAJuLFOKDeMrwIPB72lkXMzAqXlTlrNliAFcQKLqLkfJkGhdMFMqEU t7+Rn1dMJgU79bqYg1WUS+brw7Emk1XmaTAbi9y1ar4jSDs/bRlsI4yDiqQ7B9UMkNH0 ie0g68Nqy8u0BM0MRbmvJlcI1BG0bZttiqHJENbkNHcfMbZp02f/ckbcqlYX7tmrObUW N3L2gjxmL8Lk3c8OZylNdLD2p67qk+LN4c8hnNf+MtcoFdletmuasTuoFzalSjaJ7Ns6 aOsLzQdVkFLnAcal5JP0Dlp3Lph9Ywq+e34W/QhLQMLHyYz5Lf7xhRY/fVJ2cWmH+6Ny U2qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="d/3St57P"; 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 2-v6si18866731pgk.33.2018.09.18.16.00.42; Tue, 18 Sep 2018 16:00:59 -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="d/3St57P"; 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 S1726375AbeISEe4 (ORCPT + 99 others); Wed, 19 Sep 2018 00:34:56 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:41160 "EHLO mail-qk1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbeISEez (ORCPT ); Wed, 19 Sep 2018 00:34:55 -0400 Received: by mail-qk1-f177.google.com with SMTP id n3-v6so1521829qkn.8 for ; Tue, 18 Sep 2018 16:00:06 -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=PMBhSsUTwZQfsvYWSUIflvFWLLu4tkrVGV+SyhSri1Y=; b=d/3St57PTZc6V9kyW3cFctYZex1GnJ3N7fStalW+kIxBueE4oP58qAAomeQmQkm8JC yDdaJea9lTIJtWmKjUMi/9soCgtolIXmPnFlN36zdopoyLOtRgFELL63CnpjE7kkDJ4/ Ke/5Culie2XQiA/NKJPlaY4aU7huggesD+w087iIDIga1LhvSLTWhP46Rxlp+nJvbUKT pUjgzUu6CDvnNu7W4FxCVCNqTrX9gBaU3OLpaZ7yr4UYj1fFY92v5TTw11rV4Vm5aveq ee6QGWPxpl5ZQLMuB1KJ72wt61KZx55z/sSZ9F0gBOwhqV1ToQ11XwdMol0qHZJPtxpH Bs1g== 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=PMBhSsUTwZQfsvYWSUIflvFWLLu4tkrVGV+SyhSri1Y=; b=AK6AmMlQo8FjD1BhfFarjwT2AzJxRz8nUITWpaPwebqp4ny5X7GT6u1ZuMS2PO4tHK TRkUM8TQaHCcdSeLLE5NYcbxDMFppvaduPci/2MF3I0HaVHaBeVAGoyxGxCRj6ogq6gc +n+g7kA4qUX4BJIn4QwAQw9U//bOf7D7YqXZAQnw8pxiif+neQp97PyELOjYN2gdZO7N Rla36zBfQfk8CHDxQrJl46ZHoVRBcxqYOyeEr8Sj2s3Jl0lAvGGszYEXxsj79PDbhuXZ wTlKRRnGNGiVm3/SBt8zgOrm7mYefrzoG53jDFgW7N3/oj9aMCBfMumDoJWX+WXMKr6x ZovQ== X-Gm-Message-State: APzg51AlZXSNcMfZBT6rE+Mu604MSjf8iKphivbgETixRh0tAnTEHdaP ljou2IfVHCzBgjxDp9tEwrc= X-Received: by 2002:a37:c15:: with SMTP id 21-v6mr21924591qkm.95.1537311606096; Tue, 18 Sep 2018 16:00:06 -0700 (PDT) Received: from WindFlash ([179.159.21.48]) by smtp.gmail.com with ESMTPSA id 127-v6sm10815633qke.94.2018.09.18.16.00.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Sep 2018 16:00:05 -0700 (PDT) Date: Tue, 18 Sep 2018 20:00:02 -0300 From: Leonardo =?utf-8?B?QnLDoXM=?= To: Masahiro Yamada Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/1] kbuild: Optimize tests and remove shadowed local variable. Message-ID: <20180918230002.GA7572@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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c index c146020fc783..a0056df4e358 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,10 @@ static void tokenise(char *buffer, char *end) tokens[tix++].token_type = TOKEN_TYPE_NAME; continue; - } - /* Handle numbers */ - if (isdigit(*p)) { + } else if (isdigit(*p)) { + /* Handle numbers */ + /* Find the end of the number */ q = p + 1; while (q < nl && (isdigit(*q))) -- 2.19.0