[Swan-dev] replacing a loop in unbound_resolve() with memcpy?
Andrew Cagney
andrew.cagney at gmail.com
Mon Mar 29 15:19:48 UTC 2021
On Fri, 26 Mar 2021 at 10:07, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
> Code:
> for (unsigned b = 0; b < afi->ip_size; b++) {
> bytes.byte[b] = result->data[0][b];
> }
>
> Could this loop not be replaced by a memcpy?
>
> memcpy(bytes.byte, result->data[0], afi->ip_size);
>
> sure
> Is there some reason that this is a bad idea?
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20210329/607a8857/attachment.html>
More information about the Swan-dev
mailing list