Sixth batch
[git/git.git] / contrib / coccinelle / qsort.cocci
1 @@
2 expression base, nmemb, compar;
3 @@
4 - qsort(base, nmemb, sizeof(*base), compar);
5 + QSORT(base, nmemb, compar);
6
7 @@
8 expression base, nmemb, compar;
9 @@
10 - qsort(base, nmemb, sizeof(base[0]), compar);
11 + QSORT(base, nmemb, compar);
12
13 @@
14 type T;
15 T *base;
16 expression nmemb, compar;
17 @@
18 - qsort(base, nmemb, sizeof(T), compar);
19 + QSORT(base, nmemb, compar);
20
21 @@
22 expression base, nmemb, compar;
23 @@
24 - if (nmemb)
25 QSORT(base, nmemb, compar);
26
27 @@
28 expression base, nmemb, compar;
29 @@
30 - if (nmemb > 0)
31 QSORT(base, nmemb, compar);
32
33 @@
34 expression base, nmemb, compar;
35 @@
36 - if (nmemb > 1)
37 QSORT(base, nmemb, compar);