1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00
systemd/coccinelle/sd_event_source_disable_unref.cocci
2019-05-10 16:55:37 +02:00

37 lines
782 B
Plaintext

@@
expression p;
@@
- if (p) {
- (void) sd_event_source_set_enabled(p, SD_EVENT_OFF);
- p = sd_event_source_unref(p);
- }
+ p = sd_event_source_disable_unref(p);
@@
expression p;
@@
- if (p) {
- sd_event_source_set_enabled(p, SD_EVENT_OFF);
- sd_event_source_unref(p);
- }
+ sd_event_source_disable_unref(p);
@@
expression p;
@@
- if (p) {
- (void) sd_event_source_set_enabled(p, SD_EVENT_OFF);
- sd_event_source_unref(p);
- }
+ sd_event_source_disable_unref(p);
@@
expression p;
@@
- (void) sd_event_source_set_enabled(p, SD_EVENT_OFF);
- sd_event_source_unref(p);
+ sd_event_source_disable_unref(p);
@@
expression p;
@@
- sd_event_source_set_enabled(p, SD_EVENT_OFF);
- sd_event_source_unref(p);
+ sd_event_source_disable_unref(p);