Skip to content

Commit 87ffa3a

Browse files
committed
tst-fallocate: replace mktemp with mkstemp to fix compiler warnings
Signed-off-by: Waldemar Kozaczuk <jwkozaczuk@gmail.com>
1 parent 2c01ff5 commit 87ffa3a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/tst-fallocate.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ int main(int argc, char *argv[])
4949
struct statfs fs;
5050

5151
strcpy(path, "/tmp/tst-fallocateXXXXXX");
52-
mktemp(path);
5352

5453
// Create a temporary file that's used in testing.
55-
auto fd = open(path, O_CREAT|O_TRUNC|O_RDWR, 0666);
54+
auto fd = mkstemp(path);
5655
assert(fd > 0);
5756

5857
ret = fallocate(fd, 0, 0, 0);

0 commit comments

Comments
 (0)