X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Ftemp%2Fmktemp.c;h=1057651e315ccc8cefc55c454aa3e5c0682e588f;hp=1462a16c6dd189ff8354656a924bfcc324ddc67b;hb=69ecbd0f3188be97f91cc0d6415836d23e88f7fc;hpb=446b4207cc7a30d8a4d5b2445a5a1b27d440f55d diff --git a/src/temp/mktemp.c b/src/temp/mktemp.c index 1462a16c..1057651e 100644 --- a/src/temp/mktemp.c +++ b/src/temp/mktemp.c @@ -26,8 +26,9 @@ char *__mktemp(char *template) if (access(template, F_OK) < 0) return template; r = r * 1103515245 + 12345; } + *template = 0; errno = EEXIST; - return 0; + return template; } weak_alias(__mktemp, mktemp);