commit - 235b06458a4e60a61dced04eccef13dfe62c270e
commit + a80c83ad3e4a8f4b5cc64106e5b128e667e0e06c
blob - d56e19fc2744b0f22deaf1ece97b29a917c4747d
blob + f236e8d8f4b49e4be7eb033f7b4344051b08651c
--- lib/privsep.c
+++ lib/privsep.c
const struct got_error *
got_privsep_send_stop(int fd)
{
- const struct got_error *err = NULL;
struct imsgbuf ibuf;
imsg_init(&ibuf, fd);
if (imsg_compose(&ibuf, GOT_IMSG_STOP, 0, 0, -1, NULL, 0) == -1)
return got_error_from_errno("imsg_compose STOP");
- err = flush_imsg(&ibuf);
- return err;
+ return flush_imsg(&ibuf);
}
const struct got_error *
got_privsep_send_raw_obj(struct imsgbuf *ibuf, off_t size, size_t hdrlen,
uint8_t *data)
{
- const struct got_error *err = NULL;
struct got_imsg_raw_obj iobj;
size_t len = sizeof(iobj);
struct ibuf *wbuf;
len += (size_t)size + hdrlen;
wbuf = imsg_create(ibuf, GOT_IMSG_RAW_OBJECT, 0, 0, len);
- if (wbuf == NULL) {
- err = got_error_from_errno("imsg_create RAW_OBJECT");
- return err;
- }
+ if (wbuf == NULL)
+ return got_error_from_errno("imsg_create RAW_OBJECT");
if (imsg_add(wbuf, &iobj, sizeof(iobj)) == -1)
return got_error_from_errno("imsg_add RAW_OBJECT");