Wireshark-bugs: [Wireshark-bugs] [Bug 7275] iso7816: dissect ATR (answer to reset)
Date: Tue, 22 May 2012 15:47:00 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7275

--- Comment #3 from Martin Kaiser <wireshark@xxxxxxxxx> 2012-05-22 15:46:59 PDT ---

Hi Pascal,

(In reply to comment #2)
> +        if (td_it)
> +            td_tree = proto_item_add_subtree(td_it, ett_iso7816_atr_td);
> +
> +        proto_tree_add_boolean_format(td_tree, hf_iso7816_atr_next_ta_present,
> +                tvb, offset, 1, td&0x10,
> +                "TA(%d) present: %s", i+1, td&0x10 ? "True" : "False");
> 
> Why test explicitly that td_it is not null so as to define the subtree?
> proto_item_add_subtree() is already checking it internally.

Ok, understood. I'll remove this check.

> Moreover afterwards
> you are not checking td_tree value before using it.

I guess that's ok, TRY_TO_FAKE_THIS_ITEM() does the check.

> checkhf.pl script finds 3 unused entries:
> Unused entry: epan/dissectors//packet-iso7816.c, hf_iso7816_atr_ta
> Unused entry: epan/dissectors//packet-iso7816.c, hf_iso7816_atr_tb
> Unused entry: epan/dissectors//packet-iso7816.c, hf_iso7816_atr_tc

Ooops, that's a typo. I'll upload a corrected version.

Best regards,

   Martin

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