forked from osmocom/wireshark
proto: remove a temporary variable
In proto_tree_add_item_ret_time_string, we should return the result of proto_tree_add_node directly like other similar functions. Change-Id: I5f0cdc32ee3e69ecf3c62f1d56cb8278c91c9c45 Reviewed-on: https://code.wireshark.org/review/36716 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
This commit is contained in:
parent
ec781e9749
commit
55d3d32239
|
@ -3710,7 +3710,6 @@ proto_tree_add_item_ret_time_string(proto_tree *tree, int hfindex,
|
|||
const gint start, gint length, const guint encoding,
|
||||
wmem_allocator_t *scope, char **retval)
|
||||
{
|
||||
proto_item *pi;
|
||||
header_field_info *hfinfo = proto_registrar_get_nth(hfindex);
|
||||
field_info *new_fi;
|
||||
nstime_t time_stamp;
|
||||
|
@ -3749,9 +3748,7 @@ proto_tree_add_item_ret_time_string(proto_tree *tree, int hfindex,
|
|||
|
||||
new_fi->flags |= (encoding & ENC_LITTLE_ENDIAN) ? FI_LITTLE_ENDIAN : FI_BIG_ENDIAN;
|
||||
|
||||
pi = proto_tree_add_node(tree, new_fi);
|
||||
|
||||
return pi;
|
||||
return proto_tree_add_node(tree, new_fi);
|
||||
}
|
||||
|
||||
/* Gets data from tvbuff, adds it to proto_tree, increments offset,
|
||||
|
|
Loading…
Reference in New Issue