basename: return path address instead of "/" when path="/"

Signed-off-by: guohao15 <guohao15@xiaomi.com>
This commit is contained in:
guohao15
2023-11-03 14:56:40 +08:00
committed by Xiang Xiao
parent 86e00896d3
commit 3ced80c743
+1 -1
View File
@@ -83,7 +83,7 @@ FAR char *basename(FAR char *path)
} }
else else
{ {
return "/"; return path;
} }
} }