mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
ltp: fix review questions
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int sigaltstack(const stack_t *ss, stack_t *oss)
|
||||
int sigaltstack(FAR const stack_t *ss, FAR stack_t *oss)
|
||||
{
|
||||
if (ss)
|
||||
{
|
||||
|
||||
@@ -98,6 +98,7 @@ FAR char *strsignal(int signum)
|
||||
CASE_SIG_STR(SIGXFSZ, "File size limit exceeded");
|
||||
CASE_SIG_STR(SIGVTALRM, "Virtual timer expired");
|
||||
CASE_SIG_STR(SIGPROF, "Profiling timer expired");
|
||||
CASE_SIG_STR(SIGWINCH, "Window resize signal");
|
||||
CASE_SIG_STR(SIGPOLL, "Pollable event occurred");
|
||||
CASE_SIG_STR(SIGSYS, "Bad system call");
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ FAR void *malloc(size_t size)
|
||||
/* Use mm_malloc() because it implements the clear */
|
||||
|
||||
ret = mm_malloc(USR_HEAP, size);
|
||||
if (!ret)
|
||||
if (ret == NULL)
|
||||
{
|
||||
set_errno(ENOMEM);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ FAR void *memalign(size_t alignment, size_t size)
|
||||
FAR void *ret;
|
||||
|
||||
ret = mm_memalign(USR_HEAP, alignment, size);
|
||||
if (!ret)
|
||||
if (ret == NULL)
|
||||
{
|
||||
set_errno(ENOMEM);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ FAR void *realloc(FAR void *oldmem, size_t size)
|
||||
FAR void *ret;
|
||||
|
||||
ret = mm_realloc(USR_HEAP, oldmem, size);
|
||||
if (!ret)
|
||||
if (ret == NULL)
|
||||
{
|
||||
set_errno(ENOMEM);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ FAR void *zalloc(size_t size)
|
||||
/* Use mm_zalloc() because it implements the clear */
|
||||
|
||||
ret = mm_zalloc(USR_HEAP, size);
|
||||
if (!ret)
|
||||
if (ret == NULL)
|
||||
{
|
||||
set_errno(ENOMEM);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user