Changeset b5f716b in mainline for uspace/srv/net/dnsrsrv/dns_msg.c


Ignore:
Timestamp:
2014-04-18T11:32:09Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5792d6e
Parents:
80f6be9
Message:

Unbreak optimized-for-size builds (fix maybe-uninitialized)

When possible, converted the maybe-unitialized (in all cases, false alarms)
variables to an assignment with assertion testing that reasonable value
was added.

File:
1 edited

Legend:

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

    r80f6be9 rb5f716b  
    487487        size_t size;
    488488        dns_header_t hdr;
    489         size_t q_size;
     489        size_t q_size = 0;
    490490        size_t di;
    491491        int rc;
     
    515515                        return rc;
    516516
     517                assert(q_size > 0);
     518
    517519                size += q_size;
    518520        }
     
    532534                        return rc;
    533535                }
     536
     537                assert(q_size > 0);
    534538
    535539                di += q_size;
Note: See TracChangeset for help on using the changeset viewer.