]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Revert "tools: s/strncpy()/strlcpy()/g"
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 11 May 2018 13:56:58 +0000 (15:56 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 11 May 2018 13:56:58 +0000 (15:56 +0200)
This reverts commit 2ec47d5149e73db97f7877d06d67cb11421097bb.

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: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/Makefile.am
src/lxc/tools/lxc_monitor.c

index ba4993cbd44ac06d41454eb3b8ad58223d325ecd..923c43cabe9818b18cdad9faa0b3a5c1f591e8b9 100644 (file)
@@ -290,10 +290,6 @@ if ENABLE_TOOLS
 if !HAVE_GETSUBOPT
 lxc_copy_SOURCES += tools/include/getsubopt.c tools/include/getsubopt.h
 endif
-
-if !HAVE_STRLCPY
-lxc_monitor_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
-endif
 endif
 
 if ENABLE_COMMANDS
index ded6f1f385bfbb3c33f0b3bcc4bb3e93459d85be..050b5519bf9f37acfef57a7b1ec469b58879e660 100644 (file)
 #include "arguments.h"
 #include "tool_utils.h"
 
-#ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
-#endif
-
 static bool quit_monitord;
 
 static int my_parser(struct lxc_arguments* args, int c, char* arg)