diff options
author | Chris Down <chris@chrisdown.name> | 2018-12-12 14:58:46 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-12 20:47:40 +0100 |
commit | e92aaed30e0b5750e5633765f1bddd51c96678e5 (patch) | |
tree | b568cc092a868d3a4226f529e943d3cde8e72f82 /src/network/test-routing-policy-rule.c | |
parent | 9be3c605706cd8430e330e9d16df372f5daccce2 (diff) | |
download | systemd-e92aaed30e0b5750e5633765f1bddd51c96678e5.tar.gz |
tree-wide: Remove O_CLOEXEC from fdopen
fdopen doesn't accept "e", it's ignored. Let's not mislead people into
believing that it actually sets O_CLOEXEC.
From `man 3 fdopen`:
> e (since glibc 2.7):
> Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen()
As mentioned by @jlebon in #11131.
Diffstat (limited to 'src/network/test-routing-policy-rule.c')
-rw-r--r-- | src/network/test-routing-policy-rule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/test-routing-policy-rule.c b/src/network/test-routing-policy-rule.c index f80f3c09a9..57bfb6af68 100644 --- a/src/network/test-routing-policy-rule.c +++ b/src/network/test-routing-policy-rule.c @@ -28,14 +28,14 @@ static void test_rule_serialization(const char *title, const char *ruleset, cons fd = mkostemp_safe(pattern); assert_se(fd >= 0); - assert_se(f = fdopen(fd, "a+e")); + assert_se(f = fdopen(fd, "a+")); assert_se(write_string_stream(f, ruleset, 0) == 0); assert_se(routing_policy_load_rules(pattern, &rules) == 0); fd2 = mkostemp_safe(pattern2); assert_se(fd2 >= 0); - assert_se(f2 = fdopen(fd2, "a+e")); + assert_se(f2 = fdopen(fd2, "a+")); assert_se(routing_policy_serialize_rules(rules, f2) == 0); assert_se(fflush_and_check(f2) == 0); @@ -46,7 +46,7 @@ static void test_rule_serialization(const char *title, const char *ruleset, cons fd3 = mkostemp_safe(pattern3); assert_se(fd3 >= 0); - assert_se(f3 = fdopen(fd3, "we")); + assert_se(f3 = fdopen(fd3, "w")); assert_se(write_string_stream(f3, expected ?: ruleset, 0) == 0); cmd = strjoina("diff -u ", pattern3, " ", pattern2); |