aboutsummaryrefslogtreecommitdiff
path: root/src/linux/processors.c
diff options
context:
space:
mode:
authorMarat Dukhan <marat@fb.com>2017-08-24 16:35:22 -0700
committerMarat Dukhan <marat@fb.com>2017-08-24 16:35:22 -0700
commit769a95ee254d5c8658f0b9176c2e92b27af21890 (patch)
treec0e6d579895cc7eae876b0b404ab73a83ec51d1d /src/linux/processors.c
parent006461ae0a63d42863bb0665c3917e8f91a079f9 (diff)
downloadcpuinfo-769a95ee254d5c8658f0b9176c2e92b27af21890.tar.gz
Fix format string in logging in Linux sysfs parsing
Diffstat (limited to 'src/linux/processors.c')
-rw-r--r--src/linux/processors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linux/processors.c b/src/linux/processors.c
index 710309c..e464931 100644
--- a/src/linux/processors.c
+++ b/src/linux/processors.c
@@ -90,13 +90,13 @@ static bool uint32_parser(const char* text_start, const char* text_end, void* co
uint32_t kernel_max = 0;
const char* parsed_end = parse_number(text_start, text_end, &kernel_max);
if (parsed_end == text_start) {
- cpuinfo_log_error("failed to parse file %s: \"%*.s\" is not an unsigned number",
+ cpuinfo_log_error("failed to parse file %s: \"%.*s\" is not an unsigned number",
KERNEL_MAX_FILENAME, (int) (text_end - text_start), text_start);
return false;
} else {
for (const char* char_ptr = parsed_end; char_ptr != text_end; char_ptr++) {
if (!is_whitespace(*char_ptr)) {
- cpuinfo_log_warning("non-whitespace characters \"%*.s\" following number in file %s are ignored",
+ cpuinfo_log_warning("non-whitespace characters \"%.*s\" following number in file %s are ignored",
(int) (text_end - char_ptr), char_ptr, KERNEL_MAX_FILENAME);
break;
}