Skip to content

Commit

Permalink
Fix Travis error about ignoring retval of posix_memalign.
Browse files Browse the repository at this point in the history
  • Loading branch information
osschar committed Jun 1, 2020
1 parent 9851903 commit 454f588
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/XrdPfc/XrdPfc.cc
Expand Up @@ -373,8 +373,13 @@ char* Cache::RequestRAM(long long size)
else
{
m_RAM_mutex.UnLock();
char *buf = 0;
posix_memalign((void**) &buf, s_block_align, (size_t) size);
char *buf;
if (posix_memalign((void**) &buf, s_block_align, (size_t) size))
{
// Report out of mem? Probably should report it at least the first time,
// then periodically.
return 0;
}
return buf;
}
}
Expand Down

0 comments on commit 454f588

Please sign in to comment.