We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2592591 commit a6a8fb9Copy full SHA for a6a8fb9
libs/libltpnuma/tst_numa.c
@@ -127,8 +127,8 @@ static int node_has_enough_memory(int node, size_t min_kb)
127
{
128
char path[1024];
129
char buf[1024];
130
- long mem_total = 0;
131
- long mem_used = 0;
+ long mem_total = -1;
+ long mem_used = -1;
132
long file_pages = 0;
133
long mem_avail;
134
@@ -161,7 +161,7 @@ static int node_has_enough_memory(int node, size_t min_kb)
161
162
fclose(fp);
163
164
- if (!mem_total || !mem_used) {
+ if (mem_total == -1 || mem_used == -1) {
165
tst_res(TWARN, "Failed to parse '%s'", path);
166
return 0;
167
}
0 commit comments