tree-wide: various code-formatting improvements

Reported/found by Coccinelle
This commit is contained in:
Frantisek Sumsal
2019-09-22 07:17:27 +02:00
committed by Yu Watanabe
parent 1697a28567
commit 38288f0bb8
7 changed files with 9 additions and 14 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ void* greedy_realloc(void **p, size_t *allocated, size_t need, size_t size) {
* take possession of the extra space. This should be cheap, since libc doesn't have to move
* the memory for this. */
qq = realloc(q, bn * size);
qq = reallocarray(q, bn, size);
if (_likely_(qq)) {
*p = qq;
*allocated = bn;
+1 -3
View File
@@ -345,10 +345,8 @@ int cg_kill(
a workaround for kernel bug. It was fixed in 5.2-rc5 (c03cd7738a83), backported to 4.19.66
(4340d175b898) and 4.14.138 (feb6b123b7dd). */
r = cg_unified_controller(controller);
if (r < 0)
if (r <= 0)
return r;
if (r == 0) /* doesn't apply to legacy hierarchy */
return 0;
return cg_kill_items(controller, path, sig, flags, s, log_kill, userdata, "cgroup.threads");
}