diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-23 11:24:48 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-23 18:25:52 +0000 |
commit | 8bc294c0d12e742d8c539177a683eff16653b31b (patch) | |
tree | 3a309f71e73889bbe39d1df18417c250fa6a686b /epan/dissectors/packet-omron-fins.c | |
parent | d7b286c7941bb0adf0566844637ffcc245bf1db1 (diff) |
Replace more deprecated tvb_length calls
The return values of new-style dissectors always use the captured length, so
replace those automagically with sed.
Change-Id: Ic43072ee4a80d433cd4264444583a0e670adc26a
Reviewed-on: https://code.wireshark.org/review/9065
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-omron-fins.c')
-rw-r--r-- | epan/dissectors/packet-omron-fins.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-omron-fins.c b/epan/dissectors/packet-omron-fins.c index 9ac66ece2b..2dcd75de43 100644 --- a/epan/dissectors/packet-omron-fins.c +++ b/epan/dissectors/packet-omron-fins.c @@ -1189,7 +1189,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if (cmd_str_idx == -1) { /* Unknown command-code */ expert_add_info(pinfo, ti, &ei_omron_command_code); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Handle special cases wherein the data length for a command and/or a response can be 0 */ @@ -1209,7 +1209,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if (reported_length_remaining != 0) { expert_add_info_format(pinfo, omron_tree, &ei_omron_bad_length, "Unexpected Length (Should be 0)"); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1225,14 +1225,14 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da { expert_add_info_format(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); } - return tvb_length(tvb); + return tvb_captured_length(tvb); break; case 0x0801: /* command data length = 0 or > 0 is OK; */ if (is_command) { if (reported_length_remaining == 0) - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1240,13 +1240,13 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da /* command data length = 0 or > 0 is OK; */ if (is_command) { if (reported_length_remaining == 0) - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* There's no response */ if (is_response) { expert_add_info_format(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1475,7 +1475,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if(memory_code_len == 0) { expert_add_info_format(pinfo, ti, &ei_oomron_command_memory_area_code, "Unknown Memory-Area-Code (%u)", memory_area_code); - return tvb_length(tvb); /* Bail out .... */ + return tvb_captured_length(tvb); /* Bail out .... */ } proto_tree_add_item(command_tree, hf_omron_data, tvb, offset, memory_code_len, ENC_NA); offset = offset + memory_code_len; @@ -3216,7 +3216,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da } /* if(tree) */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } void |