1:255.13-alt1
[systemd_ALT.git] / coccinelle / sd_event_source_disable_unref.cocci
blob659aa00cf3246ef5cb7e9147c6fe0843b8661fb7
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 @@
3 expression p;
4 @@
5 - if (p) {
6 -         (void) sd_event_source_set_enabled(p, SD_EVENT_OFF);
7 -         p = sd_event_source_unref(p);
8 - }
9 + p = sd_event_source_disable_unref(p);
11 expression p;
13 - if (p) {
14 -         sd_event_source_set_enabled(p, SD_EVENT_OFF);
15 -         sd_event_source_unref(p);
16 - }
17 + sd_event_source_disable_unref(p);
19 expression p;
21 - if (p) {
22 -         (void) sd_event_source_set_enabled(p, SD_EVENT_OFF);
23 -         sd_event_source_unref(p);
24 - }
25 + sd_event_source_disable_unref(p);
27 expression p;
29 - (void) sd_event_source_set_enabled(p, SD_EVENT_OFF);
30 - sd_event_source_unref(p);
31 + sd_event_source_disable_unref(p);
33 expression p;
35 - sd_event_source_set_enabled(p, SD_EVENT_OFF);
36 - sd_event_source_unref(p);
37 + sd_event_source_disable_unref(p);