From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 7374B1F47C for ; Sat, 7 Jan 2023 13:24:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231625AbjAGNYW (ORCPT ); Sat, 7 Jan 2023 08:24:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231422AbjAGNYT (ORCPT ); Sat, 7 Jan 2023 08:24:19 -0500 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A60E957926 for ; Sat, 7 Jan 2023 05:24:18 -0800 (PST) Received: (qmail 23411 invoked by uid 109); 7 Jan 2023 13:24:17 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Sat, 07 Jan 2023 13:24:17 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 23583 invoked by uid 111); 7 Jan 2023 13:24:17 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Sat, 07 Jan 2023 08:24:17 -0500 Authentication-Results: peff.net; auth=none Date: Sat, 7 Jan 2023 08:24:17 -0500 From: Jeff King To: git@vger.kernel.org Subject: [PATCH 0/2] some minor starts_with()/skip_prefix() cleanups Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org I happened to notice a recently-introduced strncmp() that could have been a starts_with(). So I grepped and found a few more, and this is the result. [1/2]: convert trivial uses of strncmp() to starts_with() [2/2]: convert trivial uses of strncmp() to skip_prefix() builtin/remote-ext.c | 6 ++++-- builtin/remote-fd.c | 2 +- bundle-uri.c | 2 +- ref-filter.c | 2 +- urlmatch.c | 6 +++--- ws.c | 7 ++++--- 6 files changed, 14 insertions(+), 11 deletions(-) -Peff