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 <[email protected]>
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 <[email protected]>
---
 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;
 

Reply via email to