summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dependencies/nDPIsrvd.h2
-rw-r--r--nDPIsrvd.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/dependencies/nDPIsrvd.h b/dependencies/nDPIsrvd.h
index 9e64260d4..6623758d6 100644
--- a/dependencies/nDPIsrvd.h
+++ b/dependencies/nDPIsrvd.h
@@ -702,7 +702,7 @@ static inline int nDPIsrvd_setup_address(struct nDPIsrvd_address * const address
}
if (destination[0] == '[')
{
- if (last_colon > destination && *(last_colon - 1) != ']')
+ if (last_colon - destination > 1 && *(last_colon - 1) != ']')
{
return 1;
}
diff --git a/nDPIsrvd.c b/nDPIsrvd.c
index dd539fd73..83191e539 100644
--- a/nDPIsrvd.c
+++ b/nDPIsrvd.c
@@ -1516,8 +1516,8 @@ static int mainloop(struct nio * const io)
static int setup_event_queue(struct nio * const io)
{
#ifdef ENABLE_EPOLL
- if ((nDPIsrvd_options.use_poll == 0 && nio_use_epoll(io, 32) != NIO_SUCCESS)
- || (nDPIsrvd_options.use_poll != 0 && nio_use_poll(io, nDPIsrvd_MAX_REMOTE_DESCRIPTORS) != NIO_SUCCESS))
+ if ((nDPIsrvd_options.use_poll == 0 && nio_use_epoll(io, 32) != NIO_SUCCESS) ||
+ (nDPIsrvd_options.use_poll != 0 && nio_use_poll(io, nDPIsrvd_MAX_REMOTE_DESCRIPTORS) != NIO_SUCCESS))
#else
if (nio_use_poll(io, nDPIsrvd_MAX_REMOTE_DESCRIPTORS) != NIO_SUCCESS)
#endif