diff options
author | Daniel Mack <github@zonque.org> | 2015-11-09 21:56:49 +0100 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-11-09 21:56:49 +0100 |
commit | b0bc8dbd73b7d1f66f01849d89acca59c9fbc699 (patch) | |
tree | cf4ce91cd4a2c4dcf325ee210aa507b4dc5e78bb /src/basic | |
parent | 70d54fca18f52e20c07f37a6c86133229521ee47 (diff) | |
parent | e1427b138fbf7b7f13bb61187635b882be3ca2b2 (diff) |
Merge pull request #1820 from michich/errno-v2
[v2] treewide: treatment of errno and other cleanups
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/capability-util.c | 6 | ||||
-rw-r--r-- | src/basic/log.c | 12 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/basic/capability-util.c b/src/basic/capability-util.c index 4479200306..0eb5c03d65 100644 --- a/src/basic/capability-util.c +++ b/src/basic/capability-util.c @@ -278,10 +278,8 @@ int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities) { assert(keep_capabilities & (1ULL << (i - 1))); if (cap_set_flag(d, CAP_EFFECTIVE, j, bits, CAP_SET) < 0 || - cap_set_flag(d, CAP_PERMITTED, j, bits, CAP_SET) < 0) { - log_error_errno(errno, "Failed to enable capabilities bits: %m"); - return -errno; - } + cap_set_flag(d, CAP_PERMITTED, j, bits, CAP_SET) < 0) + return log_error_errno(errno, "Failed to enable capabilities bits: %m"); if (cap_set_proc(d) < 0) return log_error_errno(errno, "Failed to increase capabilities: %m"); diff --git a/src/basic/log.c b/src/basic/log.c index 1582fce61c..fe29cacd9e 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -445,7 +445,7 @@ static int write_to_syslog( static int write_to_kmsg( int level, int error, - const char*file, + const char *file, int line, const char *func, const char *object_field, @@ -516,7 +516,7 @@ static int log_do_header( static int write_to_journal( int level, int error, - const char*file, + const char *file, int line, const char *func, const char *object_field, @@ -650,7 +650,7 @@ int log_dump_internal( int log_internalv( int level, int error, - const char*file, + const char *file, int line, const char *func, const char *format, @@ -677,7 +677,7 @@ int log_internalv( int log_internal( int level, int error, - const char*file, + const char *file, int line, const char *func, const char *format, ...) { @@ -695,7 +695,7 @@ int log_internal( int log_object_internalv( int level, int error, - const char*file, + const char *file, int line, const char *func, const char *object_field, @@ -739,7 +739,7 @@ int log_object_internalv( int log_object_internal( int level, int error, - const char*file, + const char *file, int line, const char *func, const char *object_field, |