Re: [PATCH 5/6] ipset: Support comments in the userspace library.

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

 



On Thursday 19 September 2013 20:37:12 Jozsef Kadlecsik wrote:
> On Thu, 19 Sep 2013, Oliver wrote:
> > On Wednesday 18 September 2013 20:43:30 Jozsef Kadlecsik wrote:
> > > On Tue, 17 Sep 2013, Oliver wrote:
> > <snip>
> > 
> > > > diff --git a/lib/types.c b/lib/types.c
> > > > index adaba83..b95114f 100644
> > > > --- a/lib/types.c
> > > > +++ b/lib/types.c
> > > > @@ -607,7 +607,7 @@ ipset_load_types(void)
> > > > 
> > > >  		len = snprintf(path, sizeof(path), "%.*s",
> > > >  		
> > > >  			       (unsigned int)(next - dir), dir);
> > > > 
> > > > -		if (len >= sizeof(path) || len < 0)
> > > > +		if (len >= (int)sizeof(path) || len < (int)0)
> > > > 
> > > >  			continue;
> > > >  		
> > > >  		n = scandir(path, &list, NULL, alphasort);
> > > > 
> > > > @@ -620,7 +620,7 @@ ipset_load_types(void)
> > > > 
> > > >  			len = snprintf(file, sizeof(file), "%s/%s",
> > > >  			
> > > >  				       path, list[n]->d_name);
> > > > 
> > > > -			if (len >= sizeof(file) || len < 0)
> > > > +			if (len >= (int)sizeof(file) || len < (int)0)
> > > > 
> > > >  				goto nextf;
> > > >  			
> > > >  			if (dlopen(file, RTLD_NOW) == NULL)
> > > 
> > > I don't see why these two modifications are required.
> > 
> > Just to prevent a build failure in debug mode because warnings are
> > treated as errors and comparing an int to a size_t obviously makes it
> > unhappy.
> 
> That's good that you compiled the code in debug mode too. But what is your
> gcc version? That "len < (int)0" looks really strange.

GCC 4.7.3, but that cast on the zero constant isn't needed and frankly I'm not 
entirely sure what possessed me to put it there in the first place - I'm going 
to put it down to a lack of coffee.

Kind Regards,
Oliver.
--
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