Skip to content

Commit

Permalink
network-unix: create_cancel_fd() can be static
Browse files Browse the repository at this point in the history
This function is only used in network-unix.c, and therefore can be made
static.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed May 19, 2021
1 parent 5fd8fce commit 76e2668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int set_blocking_mode(int fd, bool blocking)
#if WITH_NETWORK_EVENTFD
#include <sys/eventfd.h>

int create_cancel_fd(struct iiod_client_pdata *io_ctx)
static int create_cancel_fd(struct iiod_client_pdata *io_ctx)
{
io_ctx->cancel_fd[0] = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
if (io_ctx->cancel_fd[0] < 0)
Expand All @@ -48,7 +48,7 @@ int create_cancel_fd(struct iiod_client_pdata *io_ctx)

#else /* WITH_NETWORK_EVENTFD */

int create_cancel_fd(struct iiod_client_pdata *io_ctx)
static int create_cancel_fd(struct iiod_client_pdata *io_ctx)
{
int ret;

Expand Down

0 comments on commit 76e2668

Please sign in to comment.