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
9d6ade4a
Unverified
Commit
9d6ade4a
authored
Aug 25, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
40464e8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Makefile.am
src/lxc/Makefile.am
+1
-0
lxc_monitor.c
src/lxc/tools/lxc_monitor.c
+4
-3
No files found.
src/lxc/Makefile.am
View file @
9d6ade4a
...
@@ -302,6 +302,7 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
...
@@ -302,6 +302,7 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
lxc_info_SOURCES
=
tools/lxc_info.c
\
lxc_info_SOURCES
=
tools/lxc_info.c
\
tools/arguments.c tools/arguments.h
tools/arguments.c tools/arguments.h
lxc_monitor_SOURCES
=
tools/lxc_monitor.c
\
lxc_monitor_SOURCES
=
tools/lxc_monitor.c
\
macro.h
\
tools/arguments.c tools/arguments.h
tools/arguments.c tools/arguments.h
lxc_ls_SOURCES
=
tools/lxc_ls.c
\
lxc_ls_SOURCES
=
tools/lxc_ls.c
\
tools/arguments.c tools/arguments.h
tools/arguments.c tools/arguments.h
...
...
src/lxc/tools/lxc_monitor.c
View file @
9d6ade4a
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#include "af_unix.h"
#include "af_unix.h"
#include "arguments.h"
#include "arguments.h"
#include "log.h"
#include "log.h"
#include "macro.h"
#include "monitor.h"
#include "monitor.h"
#include "state.h"
#include "state.h"
#include "utils.h"
#include "utils.h"
...
@@ -156,7 +157,7 @@ static int lxc_tool_monitord_spawn(const char *lxcpath)
...
@@ -156,7 +157,7 @@ static int lxc_tool_monitord_spawn(const char *lxcpath)
{
{
int
ret
;
int
ret
;
int
pipefd
[
2
];
int
pipefd
[
2
];
char
pipefd_str
[
LXC_NUMSTRLEN64
];
char
pipefd_str
[
INTTYPE_TO_STRLEN
(
int
)
];
pid_t
pid1
,
pid2
;
pid_t
pid1
,
pid2
;
char
*
const
args
[]
=
{
char
*
const
args
[]
=
{
...
@@ -223,8 +224,8 @@ static int lxc_tool_monitord_spawn(const char *lxcpath)
...
@@ -223,8 +224,8 @@ static int lxc_tool_monitord_spawn(const char *lxcpath)
close
(
pipefd
[
0
]);
close
(
pipefd
[
0
]);
ret
=
snprintf
(
pipefd_str
,
LXC_NUMSTRLEN64
,
"%d"
,
pipefd
[
1
]);
ret
=
snprintf
(
pipefd_str
,
INTTYPE_TO_STRLEN
(
int
)
,
"%d"
,
pipefd
[
1
]);
if
(
ret
<
0
||
ret
>=
LXC_NUMSTRLEN64
)
{
if
(
ret
<
0
||
ret
>=
INTTYPE_TO_STRLEN
(
int
)
)
{
ERROR
(
"Failed to create pid argument to pass to monitord"
);
ERROR
(
"Failed to create pid argument to pass to monitord"
);
_exit
(
EXIT_FAILURE
);
_exit
(
EXIT_FAILURE
);
}
}
...
...
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