From patchwork Thu Jan 24 13:11:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff King X-Patchwork-Id: 10778945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C28E91E for ; Thu, 24 Jan 2019 13:11:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 064E62F451 for ; Thu, 24 Jan 2019 13:11:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 046CB2F476; Thu, 24 Jan 2019 13:11:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A11862F451 for ; Thu, 24 Jan 2019 13:11:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728020AbfAXNLo (ORCPT ); Thu, 24 Jan 2019 08:11:44 -0500 Received: from cloud.peff.net ([104.130.231.41]:47184 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726105AbfAXNLo (ORCPT ); Thu, 24 Jan 2019 08:11:44 -0500 Received: (qmail 27428 invoked by uid 109); 24 Jan 2019 13:11:44 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Thu, 24 Jan 2019 13:11:44 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 28247 invoked by uid 111); 24 Jan 2019 13:11:48 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.94) with (ECDHE-RSA-AES256-GCM-SHA384 encrypted) SMTP; Thu, 24 Jan 2019 08:11:48 -0500 Authentication-Results: peff.net; auth=none Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Thu, 24 Jan 2019 08:11:42 -0500 Date: Thu, 24 Jan 2019 08:11:42 -0500 From: Jeff King To: git@vger.kernel.org Subject: [PATCH 2/8] apply: drop unused "def" parameter from find_name_gnu() Message-ID: <20190124131142.GB22398@sigill.intra.peff.net> References: <20190124131104.GA24017@sigill.intra.peff.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190124131104.GA24017@sigill.intra.peff.net> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We use the "def" parameter in find_name_common() for some heuristics, but they are not necessary with the less-ambiguous GNU format. Let's drop this unused parameter. Signed-off-by: Jeff King --- apply.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apply.c b/apply.c index 3703bfc8d0..ccab7e7907 100644 --- a/apply.c +++ b/apply.c @@ -467,7 +467,6 @@ static char *squash_slash(char *name) static char *find_name_gnu(struct apply_state *state, const char *line, - const char *def, int p_value) { struct strbuf name = STRBUF_INIT; @@ -714,7 +713,7 @@ static char *find_name(struct apply_state *state, int terminate) { if (*line == '"') { - char *name = find_name_gnu(state, line, def, p_value); + char *name = find_name_gnu(state, line, p_value); if (name) return name; } @@ -731,7 +730,7 @@ static char *find_name_traditional(struct apply_state *state, size_t date_len; if (*line == '"') { - char *name = find_name_gnu(state, line, def, p_value); + char *name = find_name_gnu(state, line, p_value); if (name) return name; }