Re: [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning

From: Vlad Yasevich
Date: Tue Dec 01 2009 - 14:03:06 EST




Andrei Pelinescu-Onciul wrote:
> Fix the following warning, when building on 64 bits:
>
> net/sctp/socket.c:2091: warning: large integer implicitly
> truncated to unsigned type
>
> Signed-off-by: Andrei Pelinescu-Onciul <andrei@xxxxxxxxx>

Ack.

-vlad

> ---
> net/sctp/socket.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index 71513b3..8961863 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -2088,7 +2088,7 @@ static int sctp_setsockopt_autoclose(struct sock *sk, char __user *optval,
> return -EFAULT;
> /* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */
> if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT / HZ) )
> - sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
> + sp->autoclose = (__u32)(MAX_SCHEDULE_TIMEOUT / HZ) ;
>
> return 0;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/