coverity: fix mostly bogus warnings

pull/732/head
Brad House 10 months ago
parent 1aa0683d05
commit 19d4dcdb02
  1. 2
      src/lib/ares_event_poll.c
  2. 4
      src/lib/ares_search.c

@ -75,7 +75,7 @@ static size_t ares_evsys_poll_wait(ares_event_thread_t *e,
size_t cnt = 0;
size_t i;
if (num_fds) {
if (fdlist != NULL && num_fds) {
pollfd = ares_malloc_zero(sizeof(*pollfd) * num_fds);
for (i = 0; i < num_fds; i++) {
const ares_event_t *ev =

@ -495,12 +495,12 @@ ares_status_t ares__lookup_hostaliases(const ares_channel_t *channel,
ares__llist_t *lines = NULL;
ares__llist_node_t *node;
*alias = NULL;
if (channel == NULL || name == NULL || alias == NULL) {
return ARES_EFORMERR;
}
*alias = NULL;
/* Configuration says to not perform alias lookup */
if (channel->flags & ARES_FLAG_NOALIASES) {
return ARES_ENOTFOUND;

Loading…
Cancel
Save