From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 3B6D81F8C7 for ; Tue, 29 Jun 2021 20:53:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235612AbhF2Uzm (ORCPT ); Tue, 29 Jun 2021 16:55:42 -0400 Received: from dcvr.yhbt.net ([64.71.152.64]:34810 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235605AbhF2Uzl (ORCPT ); Tue, 29 Jun 2021 16:55:41 -0400 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CE5AF1F9F3; Tue, 29 Jun 2021 20:53:05 +0000 (UTC) From: Eric Wong To: git@vger.kernel.org Cc: Jeff King , =?UTF-8?q?Ren=C3=A9=20Scharfe?= Subject: [PATCH v2 4/5] oidcpy_with_padding: constify `src' arg Date: Tue, 29 Jun 2021 20:53:04 +0000 Message-Id: <20210629205305.7100-5-e@80x24.org> In-Reply-To: <20210627024718.25383-1-e@80x24.org> References: <20210627024718.25383-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org As with `oidcpy', the source struct will not be modified and this will allow an upcoming const-correct caller to use it. Signed-off-by: Eric Wong --- hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash.h b/hash.h index 9c6df4d952..27a180248f 100644 --- a/hash.h +++ b/hash.h @@ -265,7 +265,7 @@ static inline void oidcpy(struct object_id *dst, const struct object_id *src) /* Like oidcpy() but zero-pads the unused bytes in dst's hash array. */ static inline void oidcpy_with_padding(struct object_id *dst, - struct object_id *src) + const struct object_id *src) { size_t hashsz;