Lennart Poettering
ece174c543
tree-wide: drop {} from one-line if blocks
...
Patch via coccinelle.
2015-09-09 08:20:20 +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
Lennart Poettering
3cc2aff1ab
tree-wide: don't do assignments within if checks
...
Turn this:
if ((r = foo()) < 0) { ...
into this:
r = foo();
if (r < 0) { ...
2015-09-09 08:20:20 +02:00
Lennart Poettering
7f6e12b033
tree-wide: drop redundant if checks before safe_close()
...
Replace this:
if (fd >= 0)
safe_close(fd);
by this:
safe_close(fd);
2015-09-09 08:20:19 +02:00
Lennart Poettering
66e405837b
tree-wide: make more code use safe_close()
...
Replace this:
close(fd);
fd = -1;
write this:
fd = safe_close(fd);
2015-09-09 08:20:19 +02:00
Lennart Poettering
a1e58e8ee1
tree-wide: use coccinelle to patch a lot of code to use mfree()
...
This replaces this:
free(p);
p = NULL;
by this:
p = mfree(p);
Change generated using coccinelle. Semantic patch is added to the
sources.
2015-09-09 08:19:27 +02:00