Messages in this thread Patch in this message | | | Date | Thu, 3 Jan 2008 17:17:31 +0000 | From | Alan Cox <> | 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;
| |