diff options
author | Topi Miettinen <topimiettinen@users.noreply.github.com> | 2016-09-13 06:20:38 +0000 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-09-13 08:20:38 +0200 |
commit | 646853bdd8b1337204643aa014ff3f1f49d91a4f (patch) | |
tree | aaeea183f1648a27916dc36f7c0e4468f6039faf /src/test/test-hostname-util.c | |
parent | acb986015d9def3dd65a99ea4f0f893af44c6fc3 (diff) |
fileio: simplify mkostemp_safe() (#4090)
According to its manual page, flags given to mkostemp(3) shouldn't include
O_RDWR, O_CREAT or O_EXCL flags as these are always included. Beyond
those, the only flag that all callers (except a few tests where it
probably doesn't matter) use is O_CLOEXEC, so set that unconditionally.
Diffstat (limited to 'src/test/test-hostname-util.c')
-rw-r--r-- | src/test/test-hostname-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-hostname-util.c b/src/test/test-hostname-util.c index 1c3d13ed1d..d2c3ea5e0d 100644 --- a/src/test/test-hostname-util.c +++ b/src/test/test-hostname-util.c @@ -104,7 +104,7 @@ static void test_read_hostname_config(void) { char *hostname; int fd; - fd = mkostemp_safe(path, O_RDWR|O_CLOEXEC); + fd = mkostemp_safe(path); assert(fd > 0); close(fd); |