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