Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
7a81975f
Commit
7a81975f
authored
Sep 19, 2003
by
Stephen Hemminger
Committed by
David S. Miller
Sep 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4]: In tcp_diag.c, use static, const, and void *, as appropriate.
parent
08ed527d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
net/ipv4/tcp_diag.c
net/ipv4/tcp_diag.c
+9
-9
No files found.
net/ipv4/tcp_diag.c
View file @
7a81975f
...
...
@@ -213,7 +213,7 @@ extern struct sock *tcp_v6_lookup(struct in6_addr *saddr, u16 sport,
int
dif
);
#endif
static
int
tcpdiag_get_exact
(
struct
sk_buff
*
in_skb
,
struct
nlmsghdr
*
nlh
)
static
int
tcpdiag_get_exact
(
struct
sk_buff
*
in_skb
,
const
struct
nlmsghdr
*
nlh
)
{
int
err
;
struct
sock
*
sk
;
...
...
@@ -272,7 +272,7 @@ static int tcpdiag_get_exact(struct sk_buff *in_skb, struct nlmsghdr *nlh)
return
err
;
}
int
bitstring_match
(
u32
*
a1
,
u32
*
a2
,
int
bits
)
static
int
bitstring_match
(
const
u32
*
a1
,
const
u32
*
a2
,
int
bits
)
{
int
words
=
bits
>>
5
;
...
...
@@ -299,12 +299,12 @@ int bitstring_match(u32 *a1, u32 *a2, int bits)
}
int
tcpdiag_bc_run
(
char
*
bc
,
int
len
,
struct
sock
*
sk
)
static
int
tcpdiag_bc_run
(
const
void
*
bc
,
int
len
,
struct
sock
*
sk
)
{
while
(
len
>
0
)
{
int
yes
=
1
;
struct
inet_opt
*
inet
=
inet_sk
(
sk
);
struct
tcpdiag_bc_op
*
op
=
(
struct
tcpdiag_bc_op
*
)
bc
;
const
struct
tcpdiag_bc_op
*
op
=
bc
;
switch
(
op
->
code
)
{
case
TCPDIAG_BC_NOP
:
...
...
@@ -385,10 +385,10 @@ int tcpdiag_bc_run(char *bc, int len, struct sock *sk)
return
(
len
==
0
);
}
int
valid_cc
(
char
*
bc
,
int
len
,
int
cc
)
static
int
valid_cc
(
const
void
*
bc
,
int
len
,
int
cc
)
{
while
(
len
>=
0
)
{
struct
tcpdiag_bc_op
*
op
=
(
struct
tcpdiag_bc_op
*
)
bc
;
const
struct
tcpdiag_bc_op
*
op
=
bc
;
if
(
cc
>
len
)
return
0
;
...
...
@@ -402,9 +402,9 @@ int valid_cc(char *bc, int len, int cc)
return
0
;
}
int
tcpdiag_bc_audit
(
char
*
bytecode
,
int
bytecode_len
)
static
int
tcpdiag_bc_audit
(
const
void
*
bytecode
,
int
bytecode_len
)
{
char
*
bc
=
bytecode
;
c
onst
unsigned
c
har
*
bc
=
bytecode
;
int
len
=
bytecode_len
;
while
(
len
>
0
)
{
...
...
@@ -442,7 +442,7 @@ int tcpdiag_bc_audit(char *bytecode, int bytecode_len)
}
int
tcpdiag_dump
(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
cb
)
static
int
tcpdiag_dump
(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
cb
)
{
int
i
,
num
;
int
s_i
,
s_num
;
...
...
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