1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
systemd/coccinelle/sd_event_source_disable_unref.cocci

37 lines
782 B
Plaintext
Raw Normal View History

2019-05-08 15:47:32 +03:00
@@
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);