From: Willem Toorop Date: Thu, 21 Aug 2014 15:14:08 +0000 (+0200) Subject: Lint things X-Git-Tag: release-1.7.0-rc1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f84597e8dccfb2455ac0e335c8102ae936777c28;p=thirdparty%2Fldns.git Lint things --- diff --git a/host2wire.c b/host2wire.c index b9351d15..b88baadf 100644 --- a/host2wire.c +++ b/host2wire.c @@ -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 671c4ebd..d51c4af2 100644 --- 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; diff --git a/wire2host.c b/wire2host.c index a36fd344..386c3507 100644 --- a/wire2host.c +++ b/wire2host.c @@ -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];