mirror of
https://github.com/systemd/systemd.git
synced 2024-11-30 13:53:39 +08: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.
19 lines
329 B
Plaintext
19 lines
329 B
Plaintext
@@
|
|
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);
|