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
8b80624e
Commit
8b80624e
authored
20 years ago
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ECONET]: Use size_t for size in {send,recv}msg.
parent
4c0abe61
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
net/econet/af_econet.c
net/econet/af_econet.c
+7
-3
No files found.
net/econet/af_econet.c
View file @
8b80624e
...
@@ -113,11 +113,12 @@ static void econet_insert_socket(struct hlist_head *list, struct sock *sk)
...
@@ -113,11 +113,12 @@ static void econet_insert_socket(struct hlist_head *list, struct sock *sk)
*/
*/
static
int
econet_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
static
int
econet_recvmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
,
int
flags
)
struct
msghdr
*
msg
,
size_
t
len
,
int
flags
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
int
copied
,
err
;
size_t
copied
;
int
err
;
msg
->
msg_namelen
=
sizeof
(
struct
sockaddr_ec
);
msg
->
msg_namelen
=
sizeof
(
struct
sockaddr_ec
);
...
@@ -246,7 +247,7 @@ static void ec_tx_done(struct sk_buff *skb, int result)
...
@@ -246,7 +247,7 @@ static void ec_tx_done(struct sk_buff *skb, int result)
*/
*/
static
int
econet_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
static
int
econet_sendmsg
(
struct
kiocb
*
iocb
,
struct
socket
*
sock
,
struct
msghdr
*
msg
,
in
t
len
)
struct
msghdr
*
msg
,
size_
t
len
)
{
{
struct
sock
*
sk
=
sock
->
sk
;
struct
sock
*
sk
=
sock
->
sk
;
struct
sockaddr_ec
*
saddr
=
(
struct
sockaddr_ec
*
)
msg
->
msg_name
;
struct
sockaddr_ec
*
saddr
=
(
struct
sockaddr_ec
*
)
msg
->
msg_name
;
...
@@ -308,6 +309,9 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
...
@@ -308,6 +309,9 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
return
-
ENETDOWN
;
return
-
ENETDOWN
;
}
}
if
(
len
+
15
>
dev
->
mtu
)
return
-
EMSGSIZE
;
if
(
dev
->
type
==
ARPHRD_ECONET
)
if
(
dev
->
type
==
ARPHRD_ECONET
)
{
{
/* Real hardware Econet. We're not worthy etc. */
/* Real hardware Econet. We're not worthy etc. */
...
...
This diff is collapsed.
Click to expand it.
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