diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-03-16 11:34:39 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-03-21 11:51:42 -0400 |
commit | 2e6534a9a5ad5f02a37e7dca878c521f38df8456 (patch) | |
tree | e735eb13006bcf0666dc4a2589c3bf7835ca0b91 /src | |
parent | 9a2e1571c0d535ee784cd0401f1086d790c7650b (diff) |
shared/mkdir: do not set errno in addition to return value
All callers look at the return value anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/mkdir.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/mkdir.c b/src/shared/mkdir.c index b280618a97..7ee4546988 100644 --- a/src/shared/mkdir.c +++ b/src/shared/mkdir.c @@ -41,10 +41,8 @@ int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkd (st.st_mode & 0700) > (mode & 0700) || (uid != UID_INVALID && st.st_uid != uid) || (gid != GID_INVALID && st.st_gid != gid) || - !S_ISDIR(st.st_mode)) { - errno = EEXIST; - return -errno; - } + !S_ISDIR(st.st_mode)) + return -EEXIST; return 0; } |