lkml.org 
[lkml]   [2015]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/11] net: caif: change chunk from int to size_t
Date
chunk cannot be negative and is use in operation/function that
wait for unsigned value. This patch set it as size_t.
The patch do the same for the size variable.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
net/caif/caif_socket.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index cc85891..362f6d8 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -370,7 +370,7 @@ static int caif_stream_recvmsg(struct socket *sock, struct msghdr *msg,
timeo = sock_rcvtimeo(sk, flags&MSG_DONTWAIT);

do {
- int chunk;
+ size_t chunk;
struct sk_buff *skb;

lock_sock(sk);
@@ -595,7 +595,8 @@ static int caif_stream_sendmsg(struct socket *sock, struct msghdr *msg,
{
struct sock *sk = sock->sk;
struct caifsock *cf_sk = container_of(sk, struct caifsock, sk);
- int err, size;
+ int err;
+ size_t size;
struct sk_buff *skb;
int sent = 0;
long timeo;
--
2.4.10


\
 
 \ /
  Last update: 2015-10-23 14:41    [W:0.109 / U:1.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site