From cda5c166674485f77435d1e95d482852a83c142d Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 24 Aug 2014 01:56:36 -0700 Subject: 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 --- wsutil/str_util.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'wsutil/str_util.c') 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(); -- cgit v1.2.1