Skip to content

Commit

Permalink
Squelch compiler warnings
Browse files Browse the repository at this point in the history
Unused variable, signed/unsigned comparison.

Signed-off-by: Jason A. Donenfeld <[email protected]>
  • Loading branch information
zx2c4 committed Nov 19, 2018
1 parent 472e06e commit 55dd9f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ int *tcp_listener(const char *s)
if (listen(fd, 128) < 0)
err_sys("listen");

if (allocated_fds < fd_num + 1 + 1) {
if (allocated_fds < (size_t)fd_num + 1 + 1) {
allocated_fds += 8;
fd_list = realloc(fd_list, allocated_fds * sizeof(int));
}
Expand All @@ -218,7 +218,7 @@ int *tcp_listener(const char *s)
}

/* and then add -1 as the list terminator */
if (allocated_fds < fd_num + 1 + 1)
if (allocated_fds < (size_t)fd_num + 1 + 1)
fd_list = realloc(fd_list, ++allocated_fds * sizeof(int));
fd_list[fd_num] = -1;

Expand Down
1 change: 1 addition & 0 deletions udptunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ static void send_handshake(struct relay *relay)

static void wait_for_child(int sig)
{
(void)sig;
while (waitpid(-1, NULL, WNOHANG) > 0);
}

Expand Down

0 comments on commit 55dd9f8

Please sign in to comment.