From patchwork Mon Feb 8 20:28:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 61442 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1659740lbl; Mon, 8 Feb 2016 12:44:38 -0800 (PST) X-Received: by 10.66.158.37 with SMTP id wr5mr45599775pab.48.1454964278455; Mon, 08 Feb 2016 12:44:38 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rf10si19878760pab.213.2016.02.08.12.44.38; Mon, 08 Feb 2016 12:44:38 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932338AbcBHUoX (ORCPT + 30 others); Mon, 8 Feb 2016 15:44:23 -0500 Received: from relais.videotron.ca ([24.201.245.36]:26778 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754464AbcBHUnn (ORCPT ); Mon, 8 Feb 2016 15:43:43 -0500 Content-transfer-encoding: 7BIT Received: from yoda.home ([96.23.157.65]) by VL-VM-MR006.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0O2800F9PWVR0R30@VL-VM-MR006.ip.videotron.ca>; Mon, 08 Feb 2016 15:28:40 -0500 (EST) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id BEB392DA0587; Mon, 08 Feb 2016 15:28:39 -0500 (EST) From: Nicolas Pitre To: Michal Marek , linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Al Viro , Rusty Russell Subject: [PATCH 3/6] fixdep: minor cleanup Date: Mon, 08 Feb 2016 15:28:32 -0500 Message-id: <1454963315-20468-4-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.5.0 In-reply-to: <1454963315-20468-1-git-send-email-nicolas.pitre@linaro.org> References: <1454963315-20468-1-git-send-email-nicolas.pitre@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simple code reorganization to make coming changes more obvious. Signed-off-by: Nicolas Pitre --- scripts/basic/fixdep.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) -- 2.5.0 diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 5b327c67a8..63f129021d 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -236,21 +236,20 @@ static void parse_config_file(const char *map, size_t len) continue; p += 7; for (q = p; q < map + len; q++) { - if (!(isalnum(*q) || *q == '_')) - goto found; + if (!(isalnum(*q) || *q == '_')) { + if (!memcmp(q - 7, "_MODULE", 7)) + q -= 7; + if (q - p > 0) + use_config(p, q - p); + break; + } } continue; - found: - if (!memcmp(q - 7, "_MODULE", 7)) - q -= 7; - if (q - p < 0) - continue; - use_config(p, q - p); } } -/* test is s ends in sub */ +/* test if s ends in sub */ static int strrcmp(const char *s, const char *sub) { int slen = strlen(s);