Chromium Code Reviews| Index: test/support/platform_support.h |
| diff --git a/test/support/platform_support.h b/test/support/platform_support.h |
| index 09bb29a65e4e9f9ef0f36a411417ec90afe7c0a2..f1f31339c99c6745c30bed4c80210bd927eb7f3b 100644 |
| --- a/test/support/platform_support.h |
| +++ b/test/support/platform_support.h |
| @@ -62,10 +62,13 @@ get_temp_file_name() |
| std::string Name; |
| int FD = -1; |
| do { |
| - Name = "libcxx.XXXXXX"; |
| - FD = mkstemp(&Name[0]); |
| - assert(errno != EINVAL && "Something is wrong with the mkstemp's argument"); |
| - } while (FD == -1 || errno == EEXIST); |
| + Name = "libcxx.XXXXXX"; |
| + FD = mkstemp(&Name[0]); |
| + if (FD == -1 && errno == EINVAL) { |
|
Roland McGrath
2015/04/15 22:35:22
This makes an assert into something not affected b
jvoung (off chromium)
2015/04/15 22:45:33
I think the way it is now without the assert is ok
|
| + perror("mkstemp"); |
| + abort(); |
| + } |
| + } while (FD == -1); |
|
Roland McGrath
2015/04/15 22:35:22
do ... while (FD == -1 && errno != EEXIST);
seems
Sam Clegg
2015/04/15 22:40:10
Yes, we couldn't figure out why they would want a
|
| close(FD); |
| return Name; |
| #endif |