mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-29 17:32:23 +00:00
c-collectd: fixed possible undefined behavior
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -673,7 +673,7 @@ static enum nDPIsrvd_callback_return captured_json_callback(struct nDPIsrvd_sock
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
int retval = 1;
|
||||
int retval = 1, epollfd = -1;
|
||||
|
||||
openlog("nDPIsrvd-collectd", LOG_CONS, LOG_DAEMON);
|
||||
|
||||
@@ -720,7 +720,7 @@ int main(int argc, char ** argv)
|
||||
|
||||
collectd_pid = getppid();
|
||||
|
||||
int epollfd = epoll_create1(0);
|
||||
epollfd = epoll_create1(0);
|
||||
if (epollfd < 0)
|
||||
{
|
||||
LOG(LOG_DAEMON | LOG_ERR, "Error creating epoll: %s", strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user