summaryrefslogtreecommitdiffstats
path: root/coccinelle (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | tree-wide: make use of log_error_errno() return value in more casesLennart Poettering2015-09-091-18/+24
|/ | | | | | | 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.
* tree-wide: drop {} from one-line if blocksLennart Poettering2015-09-091-0/+19
| | | | Patch via coccinelle.
* tree-wide: make use of log_error_errno() return valueLennart Poettering2015-09-091-0/+42
| | | | | | | | | | | | | | | | | | | | 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");
* tree-wide: don't do assignments within if checksLennart Poettering2015-09-091-0/+20
| | | | | | | | | | | Turn this: if ((r = foo()) < 0) { ... into this: r = foo(); if (r < 0) { ...
* tree-wide: drop redundant if checks before safe_close()Lennart Poettering2015-09-091-0/+7
| | | | | | | | | | | Replace this: if (fd >= 0) safe_close(fd); by this: safe_close(fd);
* tree-wide: make more code use safe_close()Lennart Poettering2015-09-091-0/+18
| | | | | | | | | | | Replace this: close(fd); fd = -1; write this: fd = safe_close(fd);
* tree-wide: use coccinelle to patch a lot of code to use mfree()Lennart Poettering2015-09-091-0/+6
This replaces this: free(p); p = NULL; by this: p = mfree(p); Change generated using coccinelle. Semantic patch is added to the sources.