Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/dnsrsrv/dns_msg.c

    rb5f716b r0aa70f4  
    487487        size_t size;
    488488        dns_header_t hdr;
    489         size_t q_size = 0;
     489        size_t q_size;
    490490        size_t di;
    491491        int rc;
     
    510510        size = sizeof(dns_header_t);
    511511
    512         list_foreach(msg->question, msg, dns_question_t, q) {
     512        list_foreach(msg->question, link) {
     513                dns_question_t *q = list_get_instance(link, dns_question_t, msg);
    513514                rc = dns_question_encode(q, NULL, 0, &q_size);
    514515                if (rc != EOK)
    515516                        return rc;
    516517
    517                 assert(q_size > 0);
    518 
    519518                size += q_size;
    520519        }
     
    527526        di = sizeof(dns_header_t);
    528527
    529         list_foreach(msg->question, msg, dns_question_t, q) {
     528        list_foreach(msg->question, link) {
     529                dns_question_t *q = list_get_instance(link, dns_question_t, msg);
    530530                rc = dns_question_encode(q, data + di, size - di, &q_size);
    531531                if (rc != EOK) {
     
    534534                        return rc;
    535535                }
    536 
    537                 assert(q_size > 0);
    538536
    539537                di += q_size;
Note: See TracChangeset for help on using the changeset viewer.