]> git.ipfire.org Git - thirdparty/git.git/commitdiff
oidcpy_with_padding: constify `src' arg
authorEric Wong <e@80x24.org>
Wed, 7 Jul 2021 23:10:18 +0000 (23:10 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Jul 2021 04:28:02 +0000 (21:28 -0700)
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 <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hash.h

diff --git a/hash.h b/hash.h
index 9c6df4d9527e0a5bc3581d60cdae6e03945ddaaf..27a180248f96fd4cf394b059ed92b02bcaeebc7b 100644 (file)
--- 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;