diff mbox series

[v3,4/5] oidcpy_with_padding: constify `src' arg

Message ID 20210707231019.14738-5-e@80x24.org (mailing list archive)
State Accepted
Commit 90e07f0a342df836a33b92e179eb105243dba88d
Headers show
Series [v3,1/5] speed up alt_odb_usable() with many alternates | expand

Commit Message

Eric Wong July 7, 2021, 11:10 p.m. UTC
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>
---
 hash.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;