Skip to content
Snippets Groups Projects
Commit a24adb4b authored by Avi Kivity's avatar Avi Kivity Committed by Pekka Enberg
Browse files

bsd: convert netport.c to C++


Allows making ifnet a C++ class.

Reviewed-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
Reviewed-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent e7eb5073
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,8 @@ do_copystr(const void *src, void *dest, size_t len, size_t *done)
int err = 0;
// including the terminating NUL.
strncpy(dest, src, len);
n = strnlen(dest, len);
strncpy((char*)dest, (const char*)src, len);
n = strnlen((const char *)dest, len);
if (n == len) {
// on this case, destination buf isn't null-terminated.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment