Skip to content

Commit

Permalink
RONDB-785, RONDB-789: Compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelronstrom committed Dec 4, 2024
1 parent 4f5b147 commit f4621c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion storage/ndb/include/ndb_version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ ndbd_support_set_location_domain_id(Uint32 x)
{
return true;
}
if ((major == 24) && (minor == 10) && (rel >= 0))
if ((major == 24) && (minor == 10))
{
return true;
}
Expand Down
11 changes: 6 additions & 5 deletions storage/ndb/src/common/portlib/NdbHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2154,11 +2154,12 @@ get_meminfo(struct ndb_hwinfo *hwinfo)
if (cgroup_meminfo != nullptr) {
hwinfo->is_running_in_container = 1;
FileGuard g(cgroup_meminfo); // close at end...
int ret_code = fgets(buf, sizeof(buf), cgroup_meminfo))
Uint64 memory_size = 0;
if (sscanf(buf, "%llu", &memory_size) == 1) {
hwinfo->hw_memory_size = memory_size;
return 0;
if (fgets(buf, sizeof(buf), cgroup_meminfo)) {
Uint64 memory_size = 0;
if (sscanf(buf, "%llu", &memory_size) == 1) {
hwinfo->hw_memory_size = memory_size;
return 0;
}
}
perror("failed to read /sys/fs/cgroup/memory.max");
return -1;
Expand Down

0 comments on commit f4621c6

Please sign in to comment.