From: Arran Cudbard-Bell Date: Wed, 7 Oct 2020 13:30:22 +0000 (-0500) Subject: Remove useless copy operation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ffa34216ce620cffa2ab9159068c9e2b52b87bc;p=thirdparty%2Ffreeradius-server.git Remove useless copy operation --- diff --git a/src/protocols/dhcpv4/packet.c b/src/protocols/dhcpv4/packet.c index 2c8d2918730..e1375ff3b9c 100644 --- a/src/protocols/dhcpv4/packet.c +++ b/src/protocols/dhcpv4/packet.c @@ -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);