summaryrefslogtreecommitdiff
path: root/wsutil/str_util.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-08-24 01:56:36 -0700
committerGuy Harris <guy@alum.mit.edu>2014-08-24 08:57:13 +0000
commitcda5c166674485f77435d1e95d482852a83c142d (patch)
treeb951d9fd8d5b87c033460243ddd1398a94d855d7 /wsutil/str_util.c
parenta52939cef2188f5de8964923a9f142224a421316 (diff)
downloadwireshark-cda5c166674485f77435d1e95d482852a83c142d.tar.gz
Clean up capinfos output.
Make sure there's always a space between a number and "[TGMK]bytes", "[TGMK]bits", and "[TGMK]packets". Change-Id: I710385303e451e9aea6fc9bbea562f59ca0d22c9 Reviewed-on: https://code.wireshark.org/review/3810 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/str_util.c')
-rw-r--r--wsutil/str_util.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/wsutil/str_util.c b/wsutil/str_util.c
index 696e861ccb..c171edfa6e 100644
--- a/wsutil/str_util.c
+++ b/wsutil/str_util.c
@@ -153,16 +153,22 @@ gchar *format_size(gint64 size, format_size_flags_e flags) {
case format_size_unit_none:
break;
case format_size_unit_bytes:
- g_string_append(human_str, is_small ? "bytes" : "B");
+ g_string_append(human_str, is_small ? " bytes" : "B");
break;
case format_size_unit_bits:
- g_string_append(human_str, is_small ? "bits" : "b");
+ g_string_append(human_str, is_small ? " bits" : "b");
break;
case format_size_unit_bits_s:
- g_string_append(human_str, is_small ? "bits/s" : "bps");
+ g_string_append(human_str, is_small ? " bits/s" : "bps");
break;
case format_size_unit_bytes_s:
- g_string_append(human_str, is_small ? "bytes/s" : "Bps");
+ g_string_append(human_str, is_small ? " bytes/s" : "Bps");
+ break;
+ case format_size_unit_packets:
+ g_string_append(human_str, is_small ? " packets" : "packets");
+ break;
+ case format_size_unit_packets_s:
+ g_string_append(human_str, is_small ? " packets/s" : "packets/s");
break;
default:
g_assert_not_reached();