Thread (75 messages) 75 messages, 10 authors, 2021-09-28
STALE1828d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v1 current

[PATCH v2 4/5] oidcpy_with_padding: constify `src' arg

From: Eric Wong <hidden>
Date: 2021-06-29 20:53:16
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help