Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] adding units

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 15 Apr 2014 14:28:23 -0700
On Apr 15, 2014, at 2:18 PM, "John Dill" <John.Dill@xxxxxxxxxxxxxxxxx> wrote:

>   /* Pick the proper format string */
>   if (hfinfo->type == FT_FRAMENUM) {
>     /*
>      * Frame numbers are always displayed in decimal.
>      */
>     format = "%u"; [no reason to apply a units field to FT_FRAMENUM imo]

It's an ordinal number, not a cardinal number, so no units.

>   } else {
>     switch (hfinfo->display) {
>       case BASE_DEC:
>         format = "%u"; [would become "%u %s", should be a no-brainer]

Would become "%u %s" *if there's a units string*.  Otherwise you'd get an extra blank after the number.