diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-11 22:54:56 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-11 22:54:56 +0100 |
commit | ee735086f8670be1591fa9593e80dd60163a7a2f (patch) | |
tree | 4e91aabe48b07e37cd3712a5025ad66dfbc390fa /src/basic | |
parent | c89f52ac6938374972253d8752ed65f3af0b3ef4 (diff) |
util-lib: use MODE_INVALID as invalid value for mode_t everywhere
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 7aee404bfc..cddd4232fc 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -311,7 +311,7 @@ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi if (fd < 0) return -errno; - if (mode > 0) { + if (mode != MODE_INVALID) { r = fchmod(fd, mode); if (r < 0) return -errno; @@ -338,7 +338,7 @@ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi } int touch(const char *path) { - return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, 0); + return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID); } int symlink_idempotent(const char *from, const char *to) { |