io6Library
io6Library copied to clipboard
memset/memcpy
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;
Thank you for your attention. You can use memset() or memcpy(). It means just 16 bytes.