sctp: fix sctp_setsockopt_autoclose compile warning
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Wed, 2 Dec 2009 09:16:49 +0000 (01:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Dec 2009 09:16:49 +0000 (01:16 -0800)
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@iptel.org>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c

index 5fa9ac52e13749398fd631e454d18391278b9e48..89ab66e54740240759c8329eb8e7da9ddf2080f9 100644 (file)
@@ -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;
 }