Changeset feeac0d in mainline for uspace/srv/net/dnsrsrv


Ignore:
Timestamp:
2013-09-10T16:32:35Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4982d87
Parents:
e8d6ce2
Message:

Simplify use of list_foreach.

Location:
uspace/srv/net/dnsrsrv
Files:
3 edited

Legend:

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

    re8d6ce2 rfeeac0d  
    510510        size = sizeof(dns_header_t);
    511511
    512         list_foreach(msg->question, link) {
    513                 dns_question_t *q = list_get_instance(link, dns_question_t, msg);
     512        list_foreach(msg->question, msg, dns_question_t, q) {
    514513                rc = dns_question_encode(q, NULL, 0, &q_size);
    515514                if (rc != EOK)
     
    526525        di = sizeof(dns_header_t);
    527526
    528         list_foreach(msg->question, link) {
    529                 dns_question_t *q = list_get_instance(link, dns_question_t, msg);
     527        list_foreach(msg->question, msg, dns_question_t, q) {
    530528                rc = dns_question_encode(q, data + di, size - di, &q_size);
    531529                if (rc != EOK) {
  • uspace/srv/net/dnsrsrv/query.c

    re8d6ce2 rfeeac0d  
    9999        }
    100100       
    101         list_foreach(amsg->answer, link) {
    102                 dns_rr_t *rr = list_get_instance(link, dns_rr_t, msg);
    103                
     101        list_foreach(amsg->answer, msg, dns_rr_t, rr) {
    104102                log_msg(LOG_DEFAULT, LVL_DEBUG, " - '%s' %u/%u, dsize %zu",
    105103                    rr->name, rr->rtype, rr->rclass, rr->rdata_size);
  • uspace/srv/net/dnsrsrv/transport.c

    re8d6ce2 rfeeac0d  
    158158        assert(fibril_mutex_is_locked(&treq_lock));
    159159
    160         list_foreach(treq_list, link) {
    161                 trans_req_t *treq = list_get_instance(link, trans_req_t, lreq);
    162 
     160        list_foreach(treq_list, lreq, trans_req_t, treq) {
    163161                if (treq->req->id == resp->id) {
    164162                        /* Match */
Note: See TracChangeset for help on using the changeset viewer.