mirror of
https://github.com/systemd/systemd
synced 2024-11-05 18:25:39 +00:00
de7fef4b6e
Patch contains a coccinelle script, but it only works in some cases. Many parts were converted by hand. Note: I did not fix errors in return value handing. This will be done separate to keep the patch comprehensible. No functional change is intended in this patch.
18 lines
329 B
Text
18 lines
329 B
Text
@@
|
|
local idexpression r;
|
|
expression p, k, x;
|
|
@@
|
|
- r = set_ensure_allocated(&p, k);
|
|
- if (r < 0)
|
|
- return ...;
|
|
- r = set_put(p, x);
|
|
+ r = set_ensure_put(&p, k, x);
|
|
@@
|
|
local idexpression r;
|
|
expression p, k, x;
|
|
@@
|
|
- r = set_ensure_allocated(p, k);
|
|
- if (r < 0)
|
|
- return ...;
|
|
- r = set_put(*p, x);
|
|
+ r = set_ensure_put(p, k, x);
|