public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Knutsson <ricknu-0@student.ltu.se>
To: kernel-janitors@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Richard Knutsson <ricknu-0@student.ltu.se>
Subject: [PATCH 3/3] ipc: Convert handmade 'min' to min().
Date: Mon, 17 Dec 2007 03:36:05 +0100 (MET)	[thread overview]
Message-ID: <20071217023605.24944.67698.sendpatchset@thinktank.campus.ltu.se> (raw)
In-Reply-To: <20071217023555.24944.62155.sendpatchset@thinktank.campus.ltu.se>

Convert handmade 'min' to min().

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
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;

  parent reply	other threads:[~2007-12-17  2:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17  2:35 [PATCH 1/3] ipc: Convert handmade 'max' to max() Richard Knutsson
2007-12-17  2:36 ` [PATCH 2/3] msg.h: Convert m_ts from int to size_t Richard Knutsson
2007-12-22 10:31   ` Andrew Morton
2007-12-17  2:36 ` Richard Knutsson [this message]
2007-12-22 10:27 ` [PATCH 1/3] ipc: Convert handmade 'max' to max() Andrew Morton
2008-01-04  6:46   ` Richard Knutsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071217023605.24944.67698.sendpatchset@thinktank.campus.ltu.se \
    --to=ricknu-0@student.ltu.se \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox