mirror of
https://github.com/openharmony/third_party_NuttX.git
synced 2026-07-01 08:17:34 -04:00
+1
-6
@@ -99,7 +99,7 @@ int do_symlink(const char *target, int newfd, const char *path)
|
||||
struct Mount *mount = NULL;
|
||||
int ret;
|
||||
|
||||
if (!path)
|
||||
if (!target || !path)
|
||||
{
|
||||
ret = -EFAULT;
|
||||
goto errout;
|
||||
@@ -111,11 +111,6 @@ int do_symlink(const char *target, int newfd, const char *path)
|
||||
goto errout;
|
||||
}
|
||||
|
||||
if (target == NULL)
|
||||
{
|
||||
goto errout;
|
||||
}
|
||||
|
||||
if (strlen(target) >= PATH_MAX)
|
||||
{
|
||||
ret = -ENAMETOOLONG;
|
||||
|
||||
Reference in New Issue
Block a user