]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
rrset-wire: fix comparison of narrow type with wide type in loop condition (lgtm...
authorDaniel Salzman <daniel.salzman@nic.cz>
Tue, 7 Sep 2021 11:26:45 +0000 (13:26 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Tue, 7 Sep 2021 13:39:59 +0000 (15:39 +0200)
src/libknot/packet/rrset-wire.c

index 78171a52f4d8b1d96260c509d5f2049a43f1f013..56e0cae2b4decddef9eb569e74fc8ec3a0792955 100644 (file)
@@ -1,4 +1,4 @@
-/*  Copyright (C) 2020 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/*  Copyright (C) 2021 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
 
     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) {