lkml.org 
[lkml]   [2008]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ipc: Fix warning that has recently appeared
Use _t form to force types. We know that msg->m_ts is
clamped between 0 and MAXINT.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc6-mm1/ipc/msg.c linux-2.6.24-rc6-mm1/ipc/msg.c
--- linux.vanilla-2.6.24-rc6-mm1/ipc/msg.c 2008-01-02 16:04:25.000000000 +0000
+++ linux-2.6.24-rc6-mm1/ipc/msg.c 2008-01-02 16:50:46.000000000 +0000
@@ -898,7 +898,7 @@
if (IS_ERR(msg))
return PTR_ERR(msg);

- msgsz = min(msgsz, msg->m_ts);
+ msgsz = min_t(size_t, msgsz, msg->m_ts);
*pmtype = msg->m_type;
if (store_msg(mtext, msg, msgsz))
msgsz = -EFAULT;

\
 
 \ /
  Last update: 2008-01-03 18:21    [W:0.040 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site