{
int r;
int fd;
- int pipe_fd;
struct sockaddr_un sa = { .sun_family = AF_UNIX };
struct dlog_control_msg ctrl_msg = DLOG_CTRL_REQ_PIPE;
return -errno;
}
- pipe_fd = recv_pipe(fd);
+ int ret = recv_pipe(fd);
close(fd);
- return pipe_fd;
+ return ret;
}
/**
assert(list_count(head) == 0);
void *elems[] = {"a", "b", "c"};
- int i = 0;
- for (i = 0; i < NELEMS(elems); i++) {
+ for (int i = 0; i < NELEMS(elems); i++) {
list_add(&head, elems[i]);
assert(list_count(head) == i + 1);
}
assert(list_count(head) == 0);
assert(head == 0);
- for (i = 0; i < NELEMS(elems); i++) {
+ for (int i = 0; i < NELEMS(elems); i++) {
list_add(&head, elems[i]);
assert(list_count(head) == i + 1);
}