Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
9ab207ca
Unverified
Commit
9ab207ca
authored
May 11, 2018
by
Stéphane Graber
Committed by
GitHub
May 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2318 from brauner/2018-05-11/compiler_fixes
tools: s/strncpy()/memcpy()/g
parents
b717d3fa
d96a9846
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
Makefile.am
src/lxc/Makefile.am
+0
-4
lxc_monitor.c
src/lxc/tools/lxc_monitor.c
+1
-5
No files found.
src/lxc/Makefile.am
View file @
9ab207ca
...
...
@@ -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
...
...
src/lxc/tools/lxc_monitor.c
View file @
9ab207ca
...
...
@@ -47,10 +47,6 @@
#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
)
...
...
@@ -323,7 +319,7 @@ static int lxc_abstract_unix_connect(const char *path)
return
-
1
;
}
/* addr.sun_path[0] has already been set to 0 by memset() */
strn
cpy
(
&
addr
.
sun_path
[
1
],
&
path
[
1
],
strlen
(
&
path
[
1
]));
mem
cpy
(
&
addr
.
sun_path
[
1
],
&
path
[
1
],
strlen
(
&
path
[
1
]));
ret
=
connect
(
fd
,
(
struct
sockaddr
*
)
&
addr
,
offsetof
(
struct
sockaddr_un
,
sun_path
)
+
len
+
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment