You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/06/03 13:46:13 UTC
[incubator-nuttx] 01/03: libc: tmpfile shouldn't hardcode the
folder to /tmp
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 40297065838f1bf9ba7c110333379770cc402990
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Wed Jun 3 11:25:07 2020 +0800
libc: tmpfile shouldn't hardcode the folder to /tmp
use P_tmpdir macro instead
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
libs/libc/stdio/lib_tmpfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/libc/stdio/lib_tmpfile.c b/libs/libc/stdio/lib_tmpfile.c
index 5c27de8..1965c09 100644
--- a/libs/libc/stdio/lib_tmpfile.c
+++ b/libs/libc/stdio/lib_tmpfile.c
@@ -32,7 +32,7 @@
FAR FILE *tmpfile(void)
{
- char path[L_tmpnam] = "/tmp/XXXXXX.tmp";
+ char path[L_tmpnam] = P_tmpdir "/XXXXXX.tmp";
FAR FILE *fp = NULL;
int fd;