mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
ltp: fix review questions
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
This commit is contained in:
parent
8f39ba6ae4
commit
6a5cf6d3ff
7 changed files with 7 additions and 6 deletions
|
@ -154,7 +154,7 @@ int getpwent_r(FAR struct passwd *pwd,
|
|||
}
|
||||
|
||||
ret = getpwbuf_r(ROOT_UID, ROOT_GID, ROOT_NAME, ROOT_NAME, ROOT_DIR,
|
||||
ROOT_SHELL, pwd, buf, buflen, result);
|
||||
ROOT_SHELL, pwd, buf, buflen, result);
|
||||
if (ret == 0)
|
||||
{
|
||||
g_passwd_index++;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue