mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 01:01:27 +00:00
usr/fileio: Suppress a Coverity complaint about 'page_size'
Suppress the following Coverity complaint:
CID 361202: Error handling issues (NEGATIVE_RETURNS)
"page_size" is passed to a parameter that cannot be negative.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9116 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -200,10 +200,12 @@ out:
|
||||
|
||||
static void *align_alloc(size_t size)
|
||||
{
|
||||
static uint32_t page_size;
|
||||
static long page_size;
|
||||
|
||||
if (page_size == 0)
|
||||
if (page_size == 0) {
|
||||
page_size = sysconf(_SC_PAGESIZE);
|
||||
assert(page_size > 0);
|
||||
}
|
||||
|
||||
TRACE_MEM("Request to alloc %zdKB", size / 1024);
|
||||
return memalign(page_size, size);
|
||||
|
||||
Reference in New Issue
Block a user