The open_pipe_cloexec() wrapper can be simplified to simply call
utils_create_pipe_cloexec(). This eliminates a warning of Coverity.
1407700 Identical code for different branches
The condition is redundant
In open_pipe_cloexec: The same code is executed regardless of the condition (CWE-398)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
static
int open_pipe_cloexec(void *data, int *fds)
{
- int ret;
-
- ret = utils_create_pipe_cloexec(fds);
- if (ret < 0) {
- goto end;
- }
-end:
- return ret;
+ return utils_create_pipe_cloexec(fds);
}
static