Commit 068fd2bf0c2848bb0ee960b1178e229560cadc0c

Stefan Sperling 2018-04-24T12:27:59

give some privsep functions shorter names

diff --git a/lib/got_lib_privsep.h b/lib/got_lib_privsep.h
index 43af9dc..76986d6 100644
--- a/lib/got_lib_privsep.h
+++ b/lib/got_lib_privsep.h
@@ -129,13 +129,13 @@ const struct got_error *got_privsep_send_obj(struct imsgbuf *,
     struct got_object *, int);
 const struct got_error *got_privsep_recv_obj(struct got_object **,
     struct imsgbuf *);
-const struct got_error *got_privsep_send_commit_obj(struct imsgbuf *,
+const struct got_error *got_privsep_send_commit(struct imsgbuf *,
     struct got_commit_object *);
-const struct got_error *got_privsep_recv_commit_obj(struct got_commit_object **,
+const struct got_error *got_privsep_recv_commit(struct got_commit_object **,
     struct imsgbuf *);
-const struct got_error *got_privsep_recv_tree_obj(struct got_tree_object **,
+const struct got_error *got_privsep_recv_tree(struct got_tree_object **,
     struct imsgbuf *);
-const struct got_error *got_privsep_send_tree_obj(struct imsgbuf *,
+const struct got_error *got_privsep_send_tree(struct imsgbuf *,
     struct got_tree_object *);
 
 /* TODO: Implement the above, and then add more message data types here. */
diff --git a/lib/object.c b/lib/object.c
index dc418da..3a874e6 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -776,7 +776,7 @@ read_commit_object_privsep_child(struct got_object *obj, int obj_fd,
 	if (err)
 		goto done;
 
-	err = got_privsep_send_commit_obj(&ibuf, commit);
+	err = got_privsep_send_commit(&ibuf, commit);
 done:
 	if (commit)
 		got_object_commit_close(commit);
@@ -814,7 +814,7 @@ read_commit_object_privsep(struct got_commit_object **commit,
 
 	close(imsg_fds[1]);
 	imsg_init(&parent_ibuf, imsg_fds[0]);
-	err = got_privsep_recv_commit_obj(commit, &parent_ibuf);
+	err = got_privsep_recv_commit(commit, &parent_ibuf);
 	imsg_clear(&parent_ibuf);
 	waitpid(pid, &child_status, 0);
 	close(imsg_fds[0]);
@@ -927,7 +927,7 @@ read_tree_object_privsep_child(struct got_object *obj, int obj_fd,
 	if (err)
 		goto done;
 
-	err = got_privsep_send_tree_obj(&ibuf, tree);
+	err = got_privsep_send_tree(&ibuf, tree);
 done:
 	if (tree)
 		got_object_tree_close(tree);
@@ -965,7 +965,7 @@ read_tree_object_privsep(struct got_tree_object **tree, struct got_object *obj,
 
 	close(imsg_fds[1]);
 	imsg_init(&parent_ibuf, imsg_fds[0]);
-	err = got_privsep_recv_tree_obj(tree, &parent_ibuf);
+	err = got_privsep_recv_tree(tree, &parent_ibuf);
 	imsg_clear(&parent_ibuf);
 	waitpid(pid, &child_status, 0);
 	close(imsg_fds[0]);
diff --git a/lib/privsep.c b/lib/privsep.c
index a9c67e4..71bf646 100644
--- a/lib/privsep.c
+++ b/lib/privsep.c
@@ -256,7 +256,7 @@ got_privsep_recv_obj(struct got_object **obj, struct imsgbuf *ibuf)
 }
 
 const struct got_error *
-got_privsep_send_commit_obj(struct imsgbuf *ibuf, struct got_commit_object *commit)
+got_privsep_send_commit(struct imsgbuf *ibuf, struct got_commit_object *commit)
 {
 	const struct got_error *err = NULL;
 	struct got_imsg_commit_object icommit;
@@ -306,8 +306,7 @@ done:
 	return err;
 }
 const struct got_error *
-got_privsep_recv_commit_obj(struct got_commit_object **commit,
-    struct imsgbuf *ibuf)
+got_privsep_recv_commit(struct got_commit_object **commit, struct imsgbuf *ibuf)
 {
 	const struct got_error *err = NULL;
 	struct imsg imsg;
@@ -448,7 +447,7 @@ got_privsep_recv_commit_obj(struct got_commit_object **commit,
 }
 
 const struct got_error *
-got_privsep_send_tree_obj(struct imsgbuf *ibuf, struct got_tree_object *tree)
+got_privsep_send_tree(struct imsgbuf *ibuf, struct got_tree_object *tree)
 {
 	const struct got_error *err = NULL;
 	struct got_imsg_tree_object itree;
@@ -496,7 +495,7 @@ got_privsep_send_tree_obj(struct imsgbuf *ibuf, struct got_tree_object *tree)
 }
 
 const struct got_error *
-got_privsep_recv_tree_obj(struct got_tree_object **tree, struct imsgbuf *ibuf)
+got_privsep_recv_tree(struct got_tree_object **tree, struct imsgbuf *ibuf)
 {
 	const struct got_error *err = NULL;
 	const size_t min_datalen =