Skip to content

Commit b574532

Browse files
authored
src: change FormatSize to actually accept a size_t
This function is only called with size_t values and it does not deal with unsigned values nicely, so its argument type should be size_t. PR-URL: #43464 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 028a0a3 commit b574532

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_snapshotable.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static std::string GetCodeCacheDefName(const std::string& id) {
5757
return std::string(buf) + std::string("_cache_data");
5858
}
5959

60-
static std::string FormatSize(int size) {
60+
static std::string FormatSize(size_t size) {
6161
char buf[64] = {0};
6262
if (size < 1024) {
6363
snprintf(buf, sizeof(buf), "%.2fB", static_cast<double>(size));

0 commit comments

Comments
 (0)