]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove useless copy operation
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 7 Oct 2020 13:30:22 +0000 (08:30 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 7 Oct 2020 13:30:22 +0000 (08:30 -0500)
src/protocols/dhcpv4/packet.c

index 2c8d291873080cf7486dff515daa5ae32d44982d..e1375ff3b9cd255f23fcebef3947d0150e1b3bb8 100644 (file)
@@ -332,9 +332,10 @@ int fr_dhcpv4_decode(TALLOC_CTX *ctx, uint8_t const *data, size_t data_len, VALU
                }
        } else {
                /*
-                *      Store whichever address we found from options and ensure the data type.
+                *      Store whichever address we found from options and ensure
+                *      the data type matches the pair, i.e address to prefix
+                *      conversion.
                 */
-               fr_value_box_copy(vp, &vp->data, &netaddr->data);
                fr_value_box_cast(vp, &vp->data, vp->da->type, vp->da, &netaddr->data);
        }
        fr_cursor_append(&cursor, vp);