Revert "tools: s/strncpy()/strlcpy()/g"

This reverts commit 2ec47d51. First, I forgot to actually replace strncpy() with strlcpy(). Second, we don't want to \0-terminate since this is an abstract unix socket and this is not required. Instead, let's simply use memcpy() which is more correct and also silences gcc-8. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent b717d3fa
...@@ -290,10 +290,6 @@ if ENABLE_TOOLS ...@@ -290,10 +290,6 @@ if ENABLE_TOOLS
if !HAVE_GETSUBOPT if !HAVE_GETSUBOPT
lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
endif endif
if !HAVE_STRLCPY
lxc_monitor_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
endif endif
if ENABLE_COMMANDS if ENABLE_COMMANDS
......
...@@ -47,10 +47,6 @@ ...@@ -47,10 +47,6 @@
#include "arguments.h" #include "arguments.h"
#include "tool_utils.h" #include "tool_utils.h"
#ifndef HAVE_STRLCPY
#include "include/strlcpy.h"
#endif
static bool quit_monitord; static bool quit_monitord;
static int my_parser(struct lxc_arguments* args, int c, char* arg) static int my_parser(struct lxc_arguments* args, int c, char* arg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment