diff --git a/src/xmppipe_conn.c b/src/xmppipe_conn.c index e51c4f0..269b31a 100644 --- a/src/xmppipe_conn.c +++ b/src/xmppipe_conn.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017, Michael Santos +/* Copyright (c) 2017-2023, Michael Santos * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -32,7 +32,7 @@ * The alternative is hardcoding the offsets based on the libstrophe version. */ int xmppipe_conn_fd(xmppipe_state_t *state) { - int fd = 0; + int fd; struct rlimit rl = {0}; struct stat st = {0}; diff --git a/src/xmppipe_event.c b/src/xmppipe_event.c index 6d7931e..6ea39db 100644 --- a/src/xmppipe_event.c +++ b/src/xmppipe_event.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2019, Michael Santos +/* Copyright (c) 2015-2023, Michael Santos * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,7 +23,7 @@ static int handle_stdin(xmppipe_state_t *state, int fd, char *buf, size_t len); void event_loop(xmppipe_state_t *state) { int fd = STDIN_FILENO; int eof = 0; - char *buf = NULL; + char *buf; if (xmppipe_set_nonblock(fd) < 0) return; @@ -107,9 +107,8 @@ static int handle_stdin(xmppipe_state_t *state, int fd, char *buf, size_t len) { fd_set rfds; struct timeval tv = {0}; ssize_t n = 0; - int rv = 0; + int rv; - tv.tv_sec = 0; tv.tv_usec = state->poll * 1000; FD_ZERO(&rfds);