/* Check if question is already in the list.  */
static bool _mdns_question_exists(mdns_out_question_t *needle, mdns_out_question_t *haystack)
/* Check if question is already in the list.  */
static bool _mdns_question_exists(mdns_out_question_t *needle, mdns_out_question_t *haystack)
{
    while (haystack) {
        if (haystack->type == needle->type
            && haystack->host == needle->host
            && haystack->service == needle->service
            && haystack->proto == needle->proto) {
            return true;
        }
        haystack = haystack->next;
    }
    return false;
}