diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-05 13:48:19 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-05 13:48:19 +0900 |
commit | ac67aa5fd0ee5595ef803d23440c87e381c94109 (patch) | |
tree | f05da8c3b9cfe4c778e6ff82c72999a03756cc84 | |
parent | e46ebc27547e3d09385a76ade7ab11dc794f7595 (diff) | |
parent | 9ca356fa8b9843b6565a3620f20c7538c1966c7f (diff) | |
download | git-ac67aa5fd0ee5595ef803d23440c87e381c94109.tar.gz git-ac67aa5fd0ee5595ef803d23440c87e381c94109.tar.xz |
Merge branch 'rs/cocci-de-paren-call-params'
Code clean-up.
* rs/cocci-de-paren-call-params:
coccinelle: remove parentheses that become unnecessary
-rw-r--r-- | contrib/coccinelle/array.cocci | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/coccinelle/array.cocci b/contrib/coccinelle/array.cocci index c61d1ca8d..01586821d 100644 --- a/contrib/coccinelle/array.cocci +++ b/contrib/coccinelle/array.cocci @@ -4,7 +4,7 @@ T *dst; T *src; expression n; @@ -- memcpy(dst, src, n * sizeof(*dst)); +- memcpy(dst, src, (n) * sizeof(*dst)); + COPY_ARRAY(dst, src, n); @@ @@ -13,7 +13,7 @@ T *dst; T *src; expression n; @@ -- memcpy(dst, src, n * sizeof(*src)); +- memcpy(dst, src, (n) * sizeof(*src)); + COPY_ARRAY(dst, src, n); @@ @@ -22,7 +22,7 @@ T *dst; T *src; expression n; @@ -- memcpy(dst, src, n * sizeof(T)); +- memcpy(dst, src, (n) * sizeof(T)); + COPY_ARRAY(dst, src, n); @@ @@ -47,7 +47,7 @@ type T; T *ptr; expression n; @@ -- ptr = xmalloc(n * sizeof(*ptr)); +- ptr = xmalloc((n) * sizeof(*ptr)); + ALLOC_ARRAY(ptr, n); @@ @@ -55,5 +55,5 @@ type T; T *ptr; expression n; @@ -- ptr = xmalloc(n * sizeof(T)); +- ptr = xmalloc((n) * sizeof(T)); + ALLOC_ARRAY(ptr, n); |