net/dhcp: avoid misleading strncpy

The code for copying an empty IP address into the DHCP opt buffer used
strncpy, however used the source length as the size argument. GCC 8.x
complains about it.

Since the source string is actually fixed, just revert to the old
strcpy, which gives us actually the same level of security in this case,
but makes the compiler happy.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
1 file changed