libc: fix tmpnam when no name is found
This commit is contained in:
parent
c08c63f420
commit
f14774d034
|
@ -979,9 +979,9 @@ char* tmpnam(char* storage)
|
|||
|
||||
struct stat st;
|
||||
if (stat(storage, &st) == -1 && errno == ENOENT)
|
||||
break;
|
||||
return storage;
|
||||
}
|
||||
return storage;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int ungetc_unlocked(int c, FILE* stream)
|
||||
|
|
Loading…
Reference in New Issue