On 2016-08-11 at 12:59:44 +0200, Vadim Kochan <vadi...@gmail.com> wrote:
> On Thu, Aug 11, 2016 at 1:30 PM, Tobias Klauser <tklau...@distanz.ch> wrote:
> > On 2016-08-11 at 00:57:03 +0200, Vadim Kochan <vadi...@gmail.com> wrote:
[...]
> >> +
> >> +     field->func.max = field->func.max ?: UINT32_MAX - 1;
> >
> > Shouldnt't this be UINT32_MAX (without the -1)?
> 
> The reason is just because in field_inc function I use the following:
> 
>     next = (val + inc) % (max + 1);
> 
> and in case when max == UINT32_MAX I will get division by 0.
> If you dont like UINT32_MAX - 1 then I will try to handle max + 1
> overflow somehow differently ...

Ah I see, thanks for the explanation. In this case I think UINT32_MAX -
1 is fine.

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to