Skip to content

Commit

Permalink
Fix comparison of int of diff sign in MemoryUsagePrinter.cc:92
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Sep 12, 2021
1 parent 4d197f1 commit 18d1316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/MemoryUsagePrinter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class MemoryUsagePrinter: public Base {
void update()
{
read_meminfo();
if (UNLIKELY(memtotal == -1))
if (UNLIKELY(memtotal == static_cast<std::size_t>(-1) ))
memtotal = get_memusage("MemTotal"sv);
}
void do_print(const char *format)
Expand Down

0 comments on commit 18d1316

Please sign in to comment.