File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 44T *src;
55expression n;
66@@
7- - memcpy(dst, src, n * sizeof(*dst));
7+ - memcpy(dst, src, (n) * sizeof(*dst));
88+ COPY_ARRAY(dst, src, n);
99
1010@@
@@ -13,7 +13,7 @@ T *dst;
1313T *src;
1414expression n;
1515@@
16- - memcpy(dst, src, n * sizeof(*src));
16+ - memcpy(dst, src, (n) * sizeof(*src));
1717+ COPY_ARRAY(dst, src, n);
1818
1919@@
@@ -22,7 +22,7 @@ T *dst;
2222T *src;
2323expression n;
2424@@
25- - memcpy(dst, src, n * sizeof(T));
25+ - memcpy(dst, src, (n) * sizeof(T));
2626+ COPY_ARRAY(dst, src, n);
2727
2828@@
@@ -47,13 +47,13 @@ type T;
4747T *ptr;
4848expression n;
4949@@
50- - ptr = xmalloc(n * sizeof(*ptr));
50+ - ptr = xmalloc((n) * sizeof(*ptr));
5151+ ALLOC_ARRAY(ptr, n);
5252
5353@@
5454type T;
5555T *ptr;
5656expression n;
5757@@
58- - ptr = xmalloc(n * sizeof(T));
58+ - ptr = xmalloc((n) * sizeof(T));
5959+ ALLOC_ARRAY(ptr, n);
You can’t perform that action at this time.
0 commit comments