mirror of
https://github.com/systemd/systemd
synced 2024-09-06 00:41:36 +00:00
![Zbigniew Jędrzejewski-Szmek](/assets/img/avatar_default.png)
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);
|