summaryrefslogtreecommitdiffstats
path: root/contrib/coccinelle/xstrncmpz.cocci
blob: ccb39e2bc0feef0b2f9ef3b4232dbb054ae8643f (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
@@
expression S, T, L;
@@
(
- strncmp(S, T, L) || S[L]
+ !!xstrncmpz(S, T, L)
|
- strncmp(S, T, L) || S[L] != '\0'
+ !!xstrncmpz(S, T, L)
|
- strncmp(S, T, L) || T[L]
+ !!xstrncmpz(T, S, L)
|
- strncmp(S, T, L) || T[L] != '\0'
+ !!xstrncmpz(T, S, L)
|
- !strncmp(S, T, L) && !S[L]
+ !xstrncmpz(S, T, L)
|
- !strncmp(S, T, L) && S[L] == '\0'
+ !xstrncmpz(S, T, L)
|
- !strncmp(S, T, L) && !T[L]
+ !xstrncmpz(T, S, L)
|
- !strncmp(S, T, L) && T[L] == '\0'
+ !xstrncmpz(T, S, L)
)