am 00ed9870: Fix error checking in get_temp_file_name().
* commit '00ed9870d98b93d8a6438e5cf9058ebbe10dab01': Fix error checking in get_temp_file_name().
This commit is contained in:
@@ -71,8 +71,11 @@ get_temp_file_name()
|
||||
do {
|
||||
Name = "libcxx.XXXXXX";
|
||||
FD = mkstemp(&Name[0]);
|
||||
assert(errno != EINVAL && "Something is wrong with the mkstemp's argument");
|
||||
} while (FD == -1 || errno == EEXIST);
|
||||
if (FD == -1 && errno == EINVAL) {
|
||||
perror("mkstemp");
|
||||
abort();
|
||||
}
|
||||
} while (FD == -1);
|
||||
close(FD);
|
||||
return Name;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user