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:
Jeff Morriss 2013-03-06 01:53:03 +00:00
parent f6156140c3
commit f229d12858
1 changed files with 5 additions and 2 deletions

View File

@ -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 *