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

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-05-11 15:19:45 +02:00
parent acb1bd4aed
commit 2ec47d5149
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D
2 changed files with 8 additions and 0 deletions

View File

@ -290,6 +290,10 @@ 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

View File

@ -47,6 +47,10 @@
#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)