From: Daniel Salzman Date: Tue, 7 Sep 2021 11:26:45 +0000 (+0200) Subject: rrset-wire: fix comparison of narrow type with wide type in loop condition (lgtm... X-Git-Tag: v3.1.2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2dd9e24acd336f4bb221c4f08eff0105a024ea2;p=thirdparty%2Fknot-dns.git rrset-wire: fix comparison of narrow type with wide type in loop condition (lgtm.com) --- diff --git a/src/libknot/packet/rrset-wire.c b/src/libknot/packet/rrset-wire.c index 78171a52f4..56e0cae2b4 100644 --- a/src/libknot/packet/rrset-wire.c +++ b/src/libknot/packet/rrset-wire.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 CZ.NIC, z.s.p.o. +/* Copyright (C) 2021 CZ.NIC, z.s.p.o. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -502,7 +502,7 @@ int knot_rrset_to_wire_extra(const knot_rrset_t *rrset, uint8_t *wire, size_t capacity = max_size; uint16_t count = rrset->rrs.count; - for (uint16_t i = rotate; i < count + rotate; i++) { + for (int i = rotate; i < count + rotate; i++) { uint16_t pos = (i < count) ? i : (i - count); int ret = write_rr(rrset, pos, &write, &capacity, compr, flags); if (ret != KNOT_EOK) {