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
d10ee39f
Commit
d10ee39f
authored
Aug 11, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code: Fix checkpatch.pl warnings since v0.1
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
5c9cc71f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
libnetlink.c
libnetlink.c
+3
-3
net.c
net.c
+1
-1
proc_parse.c
proc_parse.c
+6
-3
sk-inet.c
sk-inet.c
+2
-2
No files found.
libnetlink.c
View file @
d10ee39f
...
...
@@ -31,7 +31,7 @@ static int nlmsg_receive(char *buf, int len, int (*cb)(struct nlmsghdr *, void *
if
(
hdr
->
nlmsg_type
==
NLMSG_DONE
)
return
0
;
if
(
hdr
->
nlmsg_type
==
NLMSG_ERROR
)
{
struct
nlmsgerr
*
err
=
(
struct
nlmsgerr
*
)
NLMSG_DATA
(
hdr
);
struct
nlmsgerr
*
err
=
(
struct
nlmsgerr
*
)
NLMSG_DATA
(
hdr
);
if
(
hdr
->
nlmsg_len
-
sizeof
(
*
hdr
)
<
sizeof
(
struct
nlmsgerr
))
{
pr_err
(
"ERROR truncated
\n
"
);
...
...
@@ -66,7 +66,7 @@ int do_rtnl_req(int nl, void *req, int size,
msg
.
msg_iovlen
=
1
;
memset
(
&
nladdr
,
0
,
sizeof
(
nladdr
));
nladdr
.
nl_family
=
AF_NETLINK
;
nladdr
.
nl_family
=
AF_NETLINK
;
iov
.
iov_base
=
req
;
iov
.
iov_len
=
size
;
...
...
@@ -120,7 +120,7 @@ int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data,
struct
rtattr
*
rta
;
if
(
NLMSG_ALIGN
(
n
->
nlmsg_len
)
+
RTA_ALIGN
(
len
)
>
maxlen
)
{
pr_err
(
"addattr_l ERROR: message exceeded bound of %d
\n
"
,
maxlen
);
pr_err
(
"addattr_l ERROR: message exceeded bound of %d
\n
"
,
maxlen
);
return
-
1
;
}
...
...
net.c
View file @
d10ee39f
...
...
@@ -78,7 +78,7 @@ static int dump_one_link(struct nlmsghdr *hdr, void *arg)
struct
cr_fdset
*
fds
=
arg
;
struct
ifinfomsg
*
ifi
;
int
ret
=
0
,
len
=
hdr
->
nlmsg_len
-
NLMSG_LENGTH
(
sizeof
(
*
ifi
));
struct
rtattr
*
tb
[
IFLA_MAX
+
1
];
struct
rtattr
*
tb
[
IFLA_MAX
+
1
];
ifi
=
NLMSG_DATA
(
hdr
);
...
...
proc_parse.c
View file @
d10ee39f
...
...
@@ -685,9 +685,12 @@ err:
static
char
nybble
(
const
char
n
)
{
if
(
n
>=
'0'
&&
n
<=
'9'
)
return
n
-
'0'
;
else
if
(
n
>=
'A'
&&
n
<=
'F'
)
return
n
-
(
'A'
-
10
);
else
if
(
n
>=
'a'
&&
n
<=
'f'
)
return
n
-
(
'a'
-
10
);
if
(
n
>=
'0'
&&
n
<=
'9'
)
return
n
-
'0'
;
else
if
(
n
>=
'A'
&&
n
<=
'F'
)
return
n
-
(
'A'
-
10
);
else
if
(
n
>=
'a'
&&
n
<=
'f'
)
return
n
-
(
'a'
-
10
);
return
0
;
}
...
...
sk-inet.c
View file @
d10ee39f
...
...
@@ -319,12 +319,12 @@ static int inet_validate_address(InetSkEntry *ie)
if
((
ie
->
family
==
AF_INET
)
&&
/* v0.1 had 4 in ipv4 addr len */
(
ie
->
n_src_addr
>=
PB_ALEN_INET
)
&&
(
ie
->
n_dst_addr
>=
PB_ALEN_INET
)
)
(
ie
->
n_dst_addr
>=
PB_ALEN_INET
))
return
0
;
if
((
ie
->
family
==
AF_INET6
)
&&
(
ie
->
n_src_addr
==
PB_ALEN_INET6
)
&&
(
ie
->
n_dst_addr
==
PB_ALEN_INET6
)
)
(
ie
->
n_dst_addr
==
PB_ALEN_INET6
))
return
0
;
pr_err
(
"Addr len mismatch f %d ss %lu ds %lu
\n
"
,
ie
->
family
,
...
...
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