diff options
author | Gerald Combs <gerald@wireshark.org> | 2020-02-14 12:34:23 -0800 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2020-02-15 11:11:50 +0000 |
commit | 7247b98d45d906b297b3f307c26ff9bd322ad51d (patch) | |
tree | 587cf6dc5cf39365b88e89ff594231cc4b1faeab /wsutil | |
parent | 273ec3ffef76db2441392c7f4f919747443a4a7e (diff) |
wsutil: Strip the processor brand string.
The processor brand string returned by CPUID is left-padded in some
cases. For example, adding
g_warning("==>%s<==\n", CPUBrandString);
to get_cpu_info() on a test machine here returns
** (tshark.exe:3808): WARNING **: ==> Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz<==
Make sure it's stripped before we add it to our version information.
Change-Id: Idf9f9574477043a5e7fe4ff1ecb7890d6da90e0a
Reviewed-on: https://code.wireshark.org/review/36108
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/cpu_info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wsutil/cpu_info.c b/wsutil/cpu_info.c index 810b48628c..9dd42f623a 100644 --- a/wsutil/cpu_info.c +++ b/wsutil/cpu_info.c @@ -51,7 +51,7 @@ get_cpu_info(GString *str) if (str->len > 0) g_string_append(str, ", with "); - g_string_append_printf(str, "%s", CPUBrandString); + g_string_append_printf(str, "%s", g_strstrip(CPUBrandString)); if (ws_cpuid_sse42()) g_string_append(str, " (with SSE4.2)"); |