Re: [iptables PATCH 02/23] libxtables: xtoptions: Support XTOPT_NBO with XTTYPE_UINT*

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

 



On Wed, Dec 20, 2023 at 08:07:41PM +0100, Jan Engelhardt wrote:
> 
> On Wednesday 2023-12-20 17:06, Phil Sutter wrote:
> > {
> > 	const struct xt_option_entry *entry = cb->entry;
> >+	int i = cb->nvals;
> >
> >-	if (cb->nvals >= ARRAY_SIZE(cb->val.u32_range))
> >+	if (i >= ARRAY_SIZE(cb->val.u32_range))
> > 		return;
> 
> `i` should be unsigned (size_t) because ARRAY_SIZE is,
> else you get -Wsigned warnings at some point.

Oh, right! I'll make it uint8_t to match typeof(cb->nvals).

Thanks, Phil




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux