summaryrefslogtreecommitdiffstats
path: root/dev/coccinelle/cs_endp_flags.cocci
blob: 639d3211d67d77ffcb93f32c5796f52c0e4f759e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@@
struct conn_stream *cs;
expression e;
@@
(
- (cs->endp->flags & (e))
+ sc_ep_test(cs, e)
|
- (cs->endp->flags & e)
+ sc_ep_test(cs, e)
|
- cs->endp->flags & (e)
+ sc_ep_test(cs, e)
|
- cs->endp->flags & e
+ sc_ep_test(cs, e)
)

@@
struct conn_stream *cs;
expression e;
@@
(
- cs->endp->flags |= (e)
+ sc_ep_set(cs, e)
|
- cs->endp->flags |= e
+ sc_ep_set(cs, e)
)

@@
struct conn_stream *cs;
expression e;
@@
(
- cs->endp->flags &= ~(e)
+ sc_ep_clr(cs, e)
|
- cs->endp->flags &= (e)
+ sc_ep_clr(cs, ~e)
|
- cs->endp->flags &= ~e
+ sc_ep_clr(cs, e)
|
- cs->endp->flags &= e
+ sc_ep_clr(cs, ~e)
)

@@
struct conn_stream *cs;
@@
- cs->endp->flags = 0
+ sc_ep_zero(cs)

@@
struct conn_stream *cs;
expression e;
@@
(
- cs->endp->flags = (e)
+ sc_ep_setall(cs, e)
|
- cs->endp->flags = e
+ sc_ep_setall(cs, e)
)

@@
struct conn_stream *cs;
@@
(
- (cs->endp->flags)
+ sc_ep_get(cs)
|
- cs->endp->flags
+ sc_ep_get(cs)
)