forked from osmocom/wireshark
Fix the plurality of the length of a data source if it has only 1 byte (I'm
looking at a "Bitstring tvb" that is only 1 byte long). svn path=/trunk/; revision=48127
This commit is contained in:
parent
f6156140c3
commit
f229d12858
|
@ -186,7 +186,7 @@ cleanup_dissection(void)
|
|||
|
||||
/* Initialize the expert infos */
|
||||
expert_cleanup();
|
||||
|
||||
|
||||
wmem_leave_file_scope();
|
||||
|
||||
/*
|
||||
|
@ -243,7 +243,10 @@ add_new_data_source(packet_info *pinfo, tvbuff_t *tvb, const char *name)
|
|||
const char*
|
||||
get_data_source_name(const struct data_source *src)
|
||||
{
|
||||
return ep_strdup_printf("%s (%u bytes)", src->name, tvb_length(src->tvb));
|
||||
guint length = tvb_length(src->tvb);
|
||||
|
||||
return ep_strdup_printf("%s (%u byte%s)", src->name, length,
|
||||
plurality(length, "", "s"));
|
||||
}
|
||||
|
||||
tvbuff_t *
|
||||
|
|
Loading…
Reference in New Issue