diff options
author | Alex Gartrell | 2014-12-25 23:05:03 -0800 |
---|---|---|
committer | David S. Miller | 2014-12-31 14:14:54 -0500 |
commit | 87897931c83038af4931990af5b9365b41829921 (patch) | |
tree | 1521790c5f2c0ae41c6028e962ca8e88b387da2f /drivers/net/tun.c | |
parent | 886eaa1fe668e75615a48df2ff68e23b762e31e8 (diff) |
tun: Fixed unsigned/signed comparison
Validated that this was actually using the unsigned comparison with gdb.
Signed-off-by: Alex Gartrell <agartrell@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 8c8dc16839a7..df5e94871844 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1501,7 +1501,7 @@ static int tun_recvmsg(struct kiocb *iocb, struct socket *sock, goto out; } ret = tun_do_read(tun, tfile, &m->msg_iter, flags & MSG_DONTWAIT); - if (ret > total_len) { + if (ret > (ssize_t)total_len) { m->msg_flags |= MSG_TRUNC; ret = flags & MSG_TRUNC ? ret : total_len; } |