]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove dead code
authorAlan T. DeKok <aland@freeradius.org>
Tue, 24 Feb 2026 16:19:13 +0000 (11:19 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 24 Feb 2026 16:28:01 +0000 (11:28 -0500)
src/protocols/dhcpv4/decode.c

index cb0dcc146045be4de9cff5e7ddbe3e6ce020246e..968f784d79c62029261742542bda8ca8b50e264b 100644 (file)
@@ -642,7 +642,6 @@ ssize_t fr_dhcpv4_decode_option(TALLOC_CTX *ctx, fr_pair_list_t *out,
                q = concat_buffer;
 
                for (next = data; next < end; next += 2 + next[1]) {
-                       if (next >= end) return -1;
                        if (next[0] != data[0]) break;
                        if ((end - next) < 2) return -1;
                        if ((next + 2 + next[1]) > end) return -1;
@@ -653,8 +652,6 @@ ssize_t fr_dhcpv4_decode_option(TALLOC_CTX *ctx, fr_pair_list_t *out,
                        q += next[1];
                }
 
-               if (q == concat_buffer) return 0;
-
                da = fr_dict_attr_child_by_num(packet_ctx->root, p[0]);
                if (!da) {
                        da = fr_dict_attr_unknown_raw_afrom_num(packet_ctx->tmp_ctx, packet_ctx->root, p[0]);