Skip to content

Commit 02300bc

Browse files
committed
Fix log format in container macro and scanf format
1 parent 000bfb2 commit 02300bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/hotspot/os/linux/cgroupSubsystem_linux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ bool CgroupController::read_number(const char* filename, uint64_t& result) {
737737
if (!is_ok) {
738738
return false;
739739
}
740-
int matched = sscanf(buf, "%zu", &result);
740+
int matched = sscanf(buf, UINT64_FORMAT, &result);
741741
if (matched == 1) {
742742
return true;
743743
}

src/hotspot/os/linux/cgroupSubsystem_linux.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
log_trace(os, container)(log_string " failed: -2"); \
7878
return false; \
7979
} \
80-
log_trace(os, container)(log_string " is: %zu", retval); \
80+
log_trace(os, container)(log_string " is: " UINT64_FORMAT, retval); \
8181
return true; \
8282
}
8383

0 commit comments

Comments
 (0)