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
Kirill Smelkov
linux
Commits
453269c5
Commit
453269c5
authored
Jan 13, 2005
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TUN]: Make type explicit in min() usage.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
430c4e0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
drivers/net/tun.c
drivers/net/tun.c
+2
-1
No files found.
drivers/net/tun.c
View file @
453269c5
...
@@ -365,7 +365,8 @@ static ssize_t tun_chr_readv(struct file *file, const struct iovec *iv,
...
@@ -365,7 +365,8 @@ static ssize_t tun_chr_readv(struct file *file, const struct iovec *iv,
* - we are multicast promiscous.
* - we are multicast promiscous.
* - we belong to the multicast group.
* - we belong to the multicast group.
*/
*/
memcpy
(
addr
,
skb
->
data
,
min
(
sizeof
addr
,
skb
->
len
));
memcpy
(
addr
,
skb
->
data
,
min_t
(
size_t
,
sizeof
addr
,
skb
->
len
));
bit_nr
=
ether_crc
(
sizeof
addr
,
addr
)
>>
26
;
bit_nr
=
ether_crc
(
sizeof
addr
,
addr
)
>>
26
;
if
((
tun
->
if_flags
&
IFF_PROMISC
)
||
if
((
tun
->
if_flags
&
IFF_PROMISC
)
||
memcmp
(
addr
,
tun
->
dev_addr
,
sizeof
addr
)
==
0
||
memcmp
(
addr
,
tun
->
dev_addr
,
sizeof
addr
)
==
0
||
...
...
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