Re: [PATCH] xtables: symmetric COMPAT_XT_ALIGN definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux