if (dup_fd >= 0) {
out = fdopen(dup_fd, "w");
}
- }
- /* Avoid Null pointer */
- if (!out) {
- return;
+ if (!out) {
+ close(dup_fd);
+ /* fallback to standard output */
+ out = stdout;
+ }
}
/** The current single command and the remaining command(s). */
uv_fileno(endpoint->handle, &sockfd);
kr_require(sockfd != -1);
+ /* appease linter, kernel ignores optval for SO_DETACH_BPF */
int no = 0;
- if (setsockopt(sockfd, SOL_SOCKET, SO_DETACH_BPF, &no, sizeof(no)) != 0) {
+ if (setsockopt(sockfd, SOL_SOCKET, SO_DETACH_BPF, &no, 0) != 0) {
kr_log_error(NETWORK, "failed to clear SO_DETACH_BPF socket option\n");
}
/* Proceed even if setsockopt() failed,