diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-04-02 14:49:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-04-02 14:54:38 +0200 |
commit | 0c21dafb54dea7564c6a0f063492926f495006b9 (patch) | |
tree | c0e21c07cf40cf03b83a4910620bcd209313fa18 /src/basic | |
parent | d737b451fe64b659bfe1128052c9d4cb129f4bf0 (diff) | |
download | systemd-0c21dafb54dea7564c6a0f063492926f495006b9.tar.gz |
util-lib: use FLAGS_SET() where appropriate
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/fs-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index 9f3fd45691..d1c06cf12a 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -1411,9 +1411,9 @@ int open_parent(const char *path, int flags, mode_t mode) { /* Let's insist on O_DIRECTORY since the parent of a file or directory is a directory. Except if we open an * O_TMPFILE file, because in that case we are actually create a regular file below the parent directory. */ - if ((flags & O_PATH) == O_PATH) + if (FLAGS_SET(flags, O_PATH)) flags |= O_DIRECTORY; - else if ((flags & O_TMPFILE) != O_TMPFILE) + else if (!FLAGS_SET(flags, O_TMPFILE)) flags |= O_DIRECTORY|O_RDONLY; fd = open(parent, flags, mode); |