Commit Diff


commit - d283eca617a90979b34dc4892f2d632c8fcc080b
commit + babd9f5d19e75f2db561f5873c7acaf5f56c0480
blob - a0f34aa4a82baaa0867ea1ea1ae0e1c7cbbd20bf
blob + 75466594fc2f21be250335c66831f6aa2992ee42
--- lib/got_lib_privsep.h
+++ lib/got_lib_privsep.h
@@ -546,7 +546,7 @@ struct got_imsg_delta {
  * Structure for GOT_IMSG_RAW_DELTA_REQUEST data.
  */
 struct got_imsg_raw_delta_request {
-	uint8_t id[SHA1_DIGEST_LENGTH];
+	struct got_object_id id;
 	int idx;
 };
 
blob - 090e1295d22509be22db0f79d2b6ce76332f2437
blob + 81a2c482755eaf9ad6e0e776dd9ea29f24c9507f
--- lib/privsep.c
+++ lib/privsep.c
@@ -2954,7 +2954,7 @@ got_privsep_send_raw_delta_req(struct imsgbuf *ibuf, i
 
 	memset(&dreq, 0, sizeof(dreq));
 	dreq.idx = idx;
-	memcpy(dreq.id, id->sha1, SHA1_DIGEST_LENGTH);
+	memcpy(&dreq.id, id, sizeof(dreq.id));
 
 	if (imsg_compose(ibuf, GOT_IMSG_RAW_DELTA_REQUEST, 0, 0, -1,
 	    &dreq, sizeof(dreq)) == -1)
blob - 7da00ecab5dd244314979ca026eb0743fa4b139b
blob + d3624830234626794cb116fcaee59a11d7cac75b
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
@@ -880,7 +880,7 @@ raw_delta_request(struct imsg *imsg, struct imsgbuf *i
 	if (datalen != sizeof(req))
 		return got_error(GOT_ERR_PRIVSEP_LEN);
 	memcpy(&req, imsg->data, sizeof(req));
-	memcpy(id.sha1, req.id, SHA1_DIGEST_LENGTH);
+	memcpy(&id, &req.id, sizeof(id));
 
 	imsg->fd = -1;