Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memset/memcpy #23

Open
SY6502 opened this issue Jan 11, 2023 · 1 comment
Open

memset/memcpy #23

SY6502 opened this issue Jan 11, 2023 · 1 comment

Comments

@SY6502
Copy link

SY6502 commented Jan 11, 2023

Is there reason for not using memset and memcpy instead of zeroing/copying of 16 elements of array? Like this:

DHCP_allocated_ip[0] = 0;
DHCP_allocated_ip[1] = 0;
DHCP_allocated_ip[2] = 0;
DHCP_allocated_ip[3] = 0;
DHCP_allocated_ip[4] = 0;
DHCP_allocated_ip[5] = 0;
DHCP_allocated_ip[6] = 0;
DHCP_allocated_ip[7] = 0;
DHCP_allocated_ip[8] = 0;
DHCP_allocated_ip[9] = 0;
DHCP_allocated_ip[10] = 0;
DHCP_allocated_ip[11] = 0;
DHCP_allocated_ip[12] = 0;
DHCP_allocated_ip[13] = 0;
DHCP_allocated_ip[14] = 0;
DHCP_allocated_ip[15] = 0;

@taylor-an
Copy link

Thank you for your attention.
You can use memset() or memcpy().
It means just 16 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants