1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
Commit Graph

6 Commits

Author SHA1 Message Date
Yu Watanabe
1c1729c9be coccinelle: add rules for log_unit_error_errno() or friends 2020-11-27 14:35:20 +09:00
Yu Watanabe
a61c0bdf39 coccinelle: add one more rule to use return value of log_xxx_errno() 2020-11-20 02:57:26 +09:00
Michal Schmidt
b3e3bb19a0 coccinelle: additional errno.cocci hunk
rewrites:
  log_error_errno(errno, ...);
  return -errno;
into:
  return log_error_errno(errno, ...);
2015-11-09 20:01:06 +01:00
Michal Schmidt
351825cc73 coccinelle: errno.cocci improvements
Apply to all log_*_errno loglevels.
2015-11-09 20:01:06 +01:00
Lennart Poettering
94c156cd45 tree-wide: make use of log_error_errno() return value in more cases
The previous coccinelle semantic patch that improved usage of
log_error_errno()'s return value, only looked for log_error_errno()
invocations with a single parameter after the error parameter. Update
the patch to handle arbitrary numbers of additional arguments.
2015-09-09 14:58:26 +02:00
Lennart Poettering
76ef789d26 tree-wide: make use of log_error_errno() return value
Turns this:

        r = -errno;
        log_error_errno(errno, "foo");

into this:

        r = log_error_errno(errno, "foo");

and this:

        r = log_error_errno(errno, "foo");
        return r;

into this:

        return log_error_errno(errno, "foo");
2015-09-09 08:20:20 +02:00