use inet_*() functions correctly in mquery.c

also do some static analysis with clang