diff options
Diffstat (limited to 'src/regress/lib/libc/stdio_threading/fread')
| -rwxr-xr-x | src/regress/lib/libc/stdio_threading/fread/fread_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/regress/lib/libc/stdio_threading/fread/fread_test.c b/src/regress/lib/libc/stdio_threading/fread/fread_test.c index c45a64d14e..6bd734b470 100755 --- a/src/regress/lib/libc/stdio_threading/fread/fread_test.c +++ b/src/regress/lib/libc/stdio_threading/fread/fread_test.c | |||
| @@ -50,11 +50,12 @@ main(void) | |||
| 50 | strlcpy(sfn, "/tmp/barnacles.XXXXXXXX", sizeof(sfn)); | 50 | strlcpy(sfn, "/tmp/barnacles.XXXXXXXX", sizeof(sfn)); |
| 51 | if ((fd = mkstemp(sfn)) == -1 || | 51 | if ((fd = mkstemp(sfn)) == -1 || |
| 52 | (sfp = fdopen(fd, "w+")) == NULL) { | 52 | (sfp = fdopen(fd, "w+")) == NULL) { |
| 53 | int saved_errno = errno; | ||
| 53 | if (fd != -1) { | 54 | if (fd != -1) { |
| 54 | unlink(sfn); | 55 | unlink(sfn); |
| 55 | close(fd); | 56 | close(fd); |
| 56 | } | 57 | } |
| 57 | err(1, "could not open temporary file"); | 58 | errc(1, saved_errno, "could not open temporary file"); |
| 58 | } | 59 | } |
| 59 | 60 | ||
| 60 | for (i = 0; i < 4096 * THREAD_COUNT; i++) | 61 | for (i = 0; i < 4096 * THREAD_COUNT; i++) |
