libc: tmpfile shouldn't hardcode the folder to /tmp

use P_tmpdir macro instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-06-03 11:25:07 +08:00 committed by patacongo
parent 29f9d97420
commit 4029706583

View File

@ -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;