tun: Fixed unsigned/signed comparison
Subsystems (3)
PATCH 1/1 tun: Fixed unsigned/signed comparison
Validated that this was actually using the unsigned comparison with gdb.
Signed-off-by Alex Gartrell <[email protected]>
--- drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/tun.c +1 -1
@@ -1499,7 +1499,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; }
Signature · 1 line
Alex Gartrell <[email protected]>
From: Alex Gartrell <[email protected]>
Date: Thu, 25 Dec 2014 23:05:03 -0800
Quoted 3 lines
Validated that this was actually using the unsigned comparison with gdb.
Signed-off-by Alex Gartrell <[email protected]>
Applied.