(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ansi_637.c) |
| |
| 918 | | | tele_param_rel_timestamp(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) |
| 919 | | | { |
| 920 | | | guint8 oct; |
| 921 | | | guint32 value = 0; |
| 922 | | | const gchar *str = NULL; |
| 923 | | | const gchar *str2 = NULL; |
| 924 | | | |
| 925 | | | EXACT_DATA_CHECK(len, 1);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ansi_637.c |
| |
467 | #define EXACT_DATA_CHECK(edc_len, edc_eq_len) \ |
468 | if ((edc_len) != (edc_eq_len)) \ |
469 | { \ |
470 | proto_tree_add_text(tree, tvb, offset, \ |
471 | (edc_len), "Unexpected Data Length"); \ |
472 | return; \ |
473 | } |
| |
|
| 926 | | | |
| 927 | | | oct = tvb_get_guint8(tvb, offset); |
| 928 | | | |
| 929 | | | switch (oct) |
| 930 | | | { |
| 931 | | | case 245: str = "Indefinite"; break; |
| 932 | | | case 246: str = "Immediate"; break; |
| 933 | | | case 247: str = "Valid until mobile becomes inactive/Deliver when mobile next becomes active"; break; |
| 934 | | | case 248: str = "Valid until registration area changes, discard if not registered" ; break; |
| 935 | | | default: |
| 936 | | | if (oct <= 143) { value = (oct + 1) * 5; str2 = "Minutes"; break; } |
| 937 | | | else if ((oct >= 144) && (oct <= 167)) { value = (oct - 143) * 30; str2 = "Minutes + 12 Hours"; break; } |
| 938 | | | else if ((oct >= 168) && (oct <= 196)) { value = oct - 166; str2 = "Days"; break; } |
Unused Value
The value assigned to value is never subsequently used on any execution path. |
|
| 939 | | | else if ((oct >= 197) && (oct <= 244)) { value = oct - 192; str2 = "Weeks"; break; } |
| 940 | | | else { str = "Reserved"; break; } |
| 941 | | | } |
| 942 | | | |
| 943 | | | if (str == NULL) |
| 944 | | | { |
| 945 | | | proto_tree_add_text(tree, tvb, offset, 1, |
| 946 | | | "%s", str2); |
| 947 | | | } |
| 948 | | | else |
| 949 | | | { |
| 950 | | | proto_tree_add_text(tree, tvb, offset, 1, |
| 951 | | | "%d %s", |
| 952 | | | value, str2); |
| 953 | | | } |
| 954 | | | } |
| |