Convert handmade 'min' to min().

Signed-off-by: Richard Knutsson <[EMAIL PROTECTED]>
---
Dependent on 'msg->m_ts' being changed from int to size_t.


diff --git a/ipc/msg.c b/ipc/msg.c
index fdf3db5..74d0709 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -920,7 +920,7 @@ out_unlock:
        if (IS_ERR(msg))
                return PTR_ERR(msg);
 
-       msgsz = (msgsz > msg->m_ts) ? msg->m_ts : msgsz;
+       msgsz = min(msgsz, msg->m_ts);
        *pmtype = msg->m_type;
        if (store_msg(mtext, msg, msgsz))
                msgsz = -EFAULT;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to