Wireshark-bugs: [Wireshark-bugs] [Bug 7772] [PATCH] dissect only the number of active HomePlug A
Date: Mon, 1 Oct 2012 02:03:08 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7772

--- Comment #6 from Florian Fainelli <florian@xxxxxxxxxxx> 2012-10-01 02:03:07 PDT ---
(In reply to comment #4)
> (In reply to comment #1)
> > Hi Florian,
> > 
> > +      for (i = 0; i < num_act_carriers / 2; i++) {
> > May be add a check to verify num_act_carriers is different of 0 ?
> 
> Why?
> 
> I'd rather add checks when num_act_carriers is odd, 
> 
> if (num_act_carriers & 1) {
>   /* add_expert_info? */ 
> }
> 
> or is it normal to have num_act_carriers odd?

The number can be odd or even, so yes, we need to account for that. Patch v3
handles this, with previous versions we were off-by-one in the case the number
was odd.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.