]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Lint things
authorWillem Toorop <willem@nlnetlabs.nl>
Thu, 21 Aug 2014 15:14:08 +0000 (17:14 +0200)
committerWillem Toorop <willem@nlnetlabs.nl>
Thu, 21 Aug 2014 15:14:08 +0000 (17:14 +0200)
host2wire.c
rr.c
wire2host.c

index b9351d1542ce955270c2d85058efb39e32442a14..b88baadf29de8875bceb6323287adcbf213f1f15 100644 (file)
@@ -56,7 +56,7 @@ ldns_dname2buffer_wire_compress(ldns_buffer *buffer, const ldns_rdf *name, ldns_
        if((node = ldns_rbtree_search(compression_data, ldns_rdf_data(name))) != NULL)
        {
                /* Found */
-               uint16_t position = (0xC000 | (uint16_t) (intptr_t) node->data);
+               uint16_t position = (uint16_t) (intptr_t) node->data | 0xC000;
                if (ldns_buffer_reserve(buffer, 2))
                {
                        ldns_buffer_write_u16(buffer, position);
diff --git a/rr.c b/rr.c
index 671c4ebd06367d8b52f593c0ada97195d8720981..d51c4af2d46dccab093245850be4754dc2be1059 100644 (file)
--- a/rr.c
+++ b/rr.c
@@ -671,9 +671,9 @@ ldns_rr_new_question_frm_str(ldns_rr **newrr, const char *str,
 }
 
 static int
-ldns_rr_is_whitespace_line(char* line, int line_len)
+ldns_rr_is_whitespace_line(char* line, ssize_t line_len)
 {
-       int i;
+       ssize_t i;
        for (i = 0; i < line_len; i++) {
                if (!isspace((int)line[i])) {
                        return 0;
index a36fd344b6d2cd1c0180abf9da92b98770e2e8b8..386c35073dde8ad40278da2f49ff592451c522f3 100644 (file)
@@ -405,7 +405,7 @@ ldns_wire2pkt(ldns_pkt **packet_p, const uint8_t *wire, size_t max)
        ldns_rr *rr;
        ldns_pkt *packet = ldns_pkt_new();
        ldns_status status = LDNS_STATUS_OK;
-       int have_edns = 0;
+       uint8_t have_edns = 0;
 
        uint8_t data[4];