diff options
Diffstat (limited to 'tools/regression/sockets/zerosend/zerosend.c')
-rw-r--r-- | tools/regression/sockets/zerosend/zerosend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/regression/sockets/zerosend/zerosend.c b/tools/regression/sockets/zerosend/zerosend.c index a42ec51..1f3217a 100644 --- a/tools/regression/sockets/zerosend/zerosend.c +++ b/tools/regression/sockets/zerosend/zerosend.c @@ -209,12 +209,12 @@ setup_pipe(const char *test, int *fdp) static void setup_fifo(const char *test, int *fdp) { - char path[PATH_MAX]; + char path[] = "0send_fifo.XXXXXXX"; int fd1, fd2; - strcpy(path, "/tmp/0send_fifo.XXXXXXX"); - if (mktemp(path) == NULL) + if (mkstemp(path) == -1) err(-1, "%s: setup_fifo: mktemp", test); + unlink(path); if (mkfifo(path, 0600) < 0) err(-1, "%s: setup_fifo: mkfifo(%s)", test, path); |