mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
ftok:check mkdir return value.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
This commit is contained in:
parent
f45eaa608d
commit
523b72d095
1 changed files with 2 additions and 2 deletions
|
@ -66,8 +66,8 @@ key_t ftok(FAR const char *pathname, int proj_id)
|
||||||
{
|
{
|
||||||
/* Directory not exist, let's create one for caller */
|
/* Directory not exist, let's create one for caller */
|
||||||
|
|
||||||
mkdir(fullpath, S_IRWXU);
|
if (mkdir(fullpath, S_IRWXU) < 0 ||
|
||||||
if (stat(fullpath, &st) < 0)
|
stat(fullpath, &st) < 0)
|
||||||
{
|
{
|
||||||
return (key_t)-1;
|
return (key_t)-1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue