diff options
Diffstat (limited to 'contrib/unbound/sldns')
-rw-r--r-- | contrib/unbound/sldns/keyraw.c | 4 | ||||
-rw-r--r-- | contrib/unbound/sldns/str2wire.c | 2 | ||||
-rw-r--r-- | contrib/unbound/sldns/wire2str.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/contrib/unbound/sldns/keyraw.c b/contrib/unbound/sldns/keyraw.c index 90a6e85337c2..42a9262a30da 100644 --- a/contrib/unbound/sldns/keyraw.c +++ b/contrib/unbound/sldns/keyraw.c @@ -124,7 +124,7 @@ uint16_t sldns_calc_keytag_raw(uint8_t* key, size_t keysize) size_t i; uint32_t ac32 = 0; for (i = 0; i < keysize; ++i) { - ac32 += (i & 1) ? key[i] : key[i] << 8; + ac32 += ((i & 1)) ? key[i] : key[i] << 8; } ac32 += (ac32 >> 16) & 0xFFFF; return (uint16_t) (ac32 & 0xFFFF); @@ -272,7 +272,7 @@ sldns_key_buf2dsa_raw(unsigned char* key, size_t len) return NULL; } if (!DSA_set0_key(dsa, Y, NULL)) { - /* QPG attached, cleaned up by DSA_fre() */ + /* QPG attached, cleaned up by DSA_free() */ DSA_free(dsa); BN_free(Y); return NULL; diff --git a/contrib/unbound/sldns/str2wire.c b/contrib/unbound/sldns/str2wire.c index becd6d3855c9..392fc8f1d32a 100644 --- a/contrib/unbound/sldns/str2wire.c +++ b/contrib/unbound/sldns/str2wire.c @@ -857,7 +857,7 @@ rrinternal_parse_rdata(sldns_buffer* strbuf, char* token, size_t token_len, while (rdata_len && *rdata != 0) { uint8_t label_len; - if (*rdata & 0xC0) + if ((*rdata & 0xC0)) return LDNS_WIREPARSE_ERR_OK; label_len = *rdata + 1; diff --git a/contrib/unbound/sldns/wire2str.h b/contrib/unbound/sldns/wire2str.h index 772268b249c9..36c58b8b064d 100644 --- a/contrib/unbound/sldns/wire2str.h +++ b/contrib/unbound/sldns/wire2str.h @@ -262,7 +262,7 @@ int sldns_wire2str_rdata_unknown_scan(uint8_t** data, size_t* data_len, * @param pkt: packet for decompression, if NULL no decompression. * @param pktlen: length of packet buffer. * @param comprloop: inout bool, that is set true if compression loop failure - * happens. Pass in 0, if passsed in as true, a lower bound is set + * happens. Pass in 0, if passed in as true, a lower bound is set * on compression loops to stop arbitrary long packet parse times. * This is meant so you can set it to 0 at the start of a list of dnames, * and then scan all of them in sequence, if a loop happens, it becomes |