Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
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
zhul
criu
Commits
339ad2d8
Commit
339ad2d8
authored
Feb 01, 2012
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
files: Get rid of strict-aliasing violations
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@openvz.org
>
parent
7050ea2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
files.c
files.c
+7
-3
No files found.
files.c
View file @
339ad2d8
...
...
@@ -329,7 +329,8 @@ static int open_fd(int pid, struct fdinfo_entry *fe,
struct
msghdr
hdr
;
struct
iovec
data
;
char
cmsgbuf
[
CMSG_SPACE
(
sizeof
(
int
))];
struct
cmsghdr
*
cmsg
;
struct
cmsghdr
*
cmsg
;
int
*
cmsg_data
;
char
dummy
=
'*'
;
...
...
@@ -365,7 +366,8 @@ static int open_fd(int pid, struct fdinfo_entry *fe,
cmsg
->
cmsg_level
=
SOL_SOCKET
;
cmsg
->
cmsg_type
=
SCM_RIGHTS
;
*
(
int
*
)
CMSG_DATA
(
cmsg
)
=
fe
->
addr
;
cmsg_data
=
(
int
*
)
CMSG_DATA
(
cmsg
);
*
cmsg_data
=
fe
->
addr
;
tmp
=
sendmsg
(
sock
,
&
hdr
,
0
);
if
(
tmp
<
0
)
{
...
...
@@ -387,6 +389,7 @@ static int recv_fd(int sock)
char
buf
[
1
];
char
ccmsg
[
CMSG_SPACE
(
sizeof
(
int
))];
struct
cmsghdr
*
cmsg
;
int
*
cmsg_data
;
iov
.
iov_base
=
buf
;
iov
.
iov_len
=
1
;
int
ret
;
...
...
@@ -411,7 +414,8 @@ static int recv_fd(int sock)
return
-
1
;
}
return
*
(
int
*
)
CMSG_DATA
(
cmsg
);
cmsg_data
=
(
int
*
)
CMSG_DATA
(
cmsg
);
return
*
cmsg_data
;
}
static
int
receive_fd
(
int
pid
,
struct
fdinfo_entry
*
fe
,
struct
fdinfo_desc
*
fi
)
...
...
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