(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ansi_a.c) |
| |
| 4744 | | | elem_reg_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) |
| 4745 | | | { |
| 4746 | | | guint8 oct; |
| 4747 | | | guint32 curr_offset; |
| 4748 | | | const gchar *str; |
| 4749 | | | |
| 4750 | | | len = len; |
Unused Value
The value assigned to len is never subsequently used on any execution path. |
|
| 4751 | | | curr_offset = offset; |
| 4752 | | | |
| 4753 | | | oct = tvb_get_guint8(tvb, curr_offset); |
| 4754 | | | |
| 4755 | | | switch (oct) |
| 4756 | | | { |
| 4757 | | | case 0x00: str = "Timer-based"; break; |
| 4758 | | | case 0x01: str = "Power-up"; break; |
| 4759 | | | case 0x02: str = "Zone-based"; break; |
| 4760 | | | case 0x03: str = "Power-down"; break; |
| 4761 | | | case 0x04: str = "Parameter-change"; break; |
| 4762 | | | case 0x05: str = "Ordered"; break; |
| 4763 | | | case 0x06: str = "Distance-based"; break; |
| 4764 | | | case 0x07: str = "User Zone-based"; break; |
| 4765 | | | case 0x09: str = "BCMC Registration"; break; |
| 4766 | | | default: |
| 4767 | | | str = "Reserved"; |
| 4768 | | | break; |
| 4769 | | | } |
| 4770 | | | |
| 4771 | | | proto_tree_add_text(tree, |
| 4772 | | | tvb, curr_offset, 1, |
| 4773 | | | "Location Registration Type: %s", |
| 4774 | | | str); |
| 4775 | | | |
| 4776 | | | g_snprintf(add_string, string_len, " - (%s)", str); |
| 4777 | | | |
| 4778 | | | curr_offset++; |
| 4779 | | | |
| 4780 | | | |
| 4781 | | | |
| 4782 | | | return(curr_offset - offset); |
| 4783 | | | } |
| |