Skip to content

Commit

Permalink
client: fix warning suspicious assertion in asyncns
Browse files Browse the repository at this point in the history
It seems to be a typo in the check as all other function check for equality between
both arguments.

Fixes: #106
  • Loading branch information
lynxis committed Feb 5, 2020
1 parent e2f88bf commit 2664f89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/libasyncns/asyncns.c
Original file line number Diff line number Diff line change
Expand Up @@ -1481,15 +1481,15 @@ int asyncns_isdone(asyncns_t *asyncns, asyncns_query_t*q) {
void asyncns_setuserdata(asyncns_t *asyncns, asyncns_query_t *q, void *userdata) {
assert(q);
assert(asyncns);
assert(q->asyncns = asyncns);
assert(q->asyncns == asyncns);

q->userdata = userdata;
}

void* asyncns_getuserdata(asyncns_t *asyncns, asyncns_query_t *q) {
assert(q);
assert(asyncns);
assert(q->asyncns = asyncns);
assert(q->asyncns == asyncns);

return q->userdata;
}

0 comments on commit 2664f89

Please sign in to comment.