Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/tools/coccinelle/qsort.cocci # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / tools / coccinelle / qsort.cocci` 37 lines ยท 610 bytes Raw Blame History 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);