netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: kaber@trash.net, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] xtables: symmetric COMPAT_XT_ALIGN definition
Date: Sat, 6 Feb 2010 08:30:15 +0200	[thread overview]
Message-ID: <20100206063015.GA4129@x200> (raw)
In-Reply-To: <alpine.LSU.2.01.1002060018530.32310@obet.zrqbmnf.qr>

On Sat, Feb 06, 2010 at 12:22:54AM +0100, Jan Engelhardt wrote:
> On Friday 2010-02-05 23:13, Alexey Dobriyan wrote:
> >@@ -514,7 +514,7 @@ int xt_check_target(struct xt_tgchk_param *par,
> > 		    unsigned int size, u_int8_t proto, bool inv_proto)
> > {
> > 	if (XT_ALIGN(par->target->targetsize) != size) {
> >-		pr_err("%s_tables: %s target: invalid size %Zu != %u\n",
> >+		pr_err("%s_tables: %s target: invalid size %u != %u\n",
> > 		       xt_prefix[par->family], par->target->name,
> > 		       XT_ALIGN(par->target->targetsize), size);
> > 		return -EINVAL;
> >@@ -364,7 +364,7 @@ int xt_check_match(struct xt_mtchk_param *par,
> > 		 * ebt_among is exempt from centralized matchsize checking
> > 		 * because it uses a dynamic-size data set.
> > 		 */
> >-		pr_err("%s_tables: %s match: invalid size %Zu != %u\n",
> >+		pr_err("%s_tables: %s match: invalid size %u != %u\n",
> > 		       xt_prefix[par->family], par->match->name,
> > 		       XT_ALIGN(par->match->matchsize), size);
> > 		return -EINVAL;
> 
> Why are you changing this? __alignof__ still returns a size_t,
> and this type promotes through the course of the ALIGN macro.

alignment is casted to the type of alignee, so it's unsigned int now:

	#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)

  reply	other threads:[~2010-02-06  6:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 22:13 [PATCH] xtables: symmetric COMPAT_XT_ALIGN definition Alexey Dobriyan
2010-02-05 23:22 ` Jan Engelhardt
2010-02-06  6:30   ` Alexey Dobriyan [this message]
2010-02-10 14:04 ` Patrick McHardy

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=20100206063015.GA4129@x200 \
    --to=adobriyan@gmail.com \
    --cc=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).