diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-13 11:26:55 -0400 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-25 09:46:52 +0200 |
commit | 6dd3666c62e6508289b40a2a3abd3a465197cefc (patch) | |
tree | 0ff25d089d2a9aef530c70078de7ecf06477b97d /src/core/cgroup.c | |
parent | d04b238170998e0cbcc86db0f8ae66c3ee4a14d6 (diff) |
tree-wide: when %m is used in log_*, always specify errno explicitly
All those uses were correct, but I think it's better to be explicit.
Using implicit errno is too error prone, and with this change we can require
(in the sense of a style guideline) that the code is always specified.
Helpful query: git grep -n -P 'log_[^s][a-z]+\(.*%m'
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r-- | src/core/cgroup.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index bda1d5349..9fa81eaaa 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -399,8 +399,7 @@ static int whitelist_major(const char *path, const char *name, char type, const return 0; fail: - log_warning_errno(errno, "Failed to read /proc/devices: %m"); - return -errno; + return log_warning_errno(errno, "Failed to read /proc/devices: %m"); } static bool cgroup_context_has_cpu_weight(CGroupContext *c) { |