2016-10-31 | Paul Boddie | raw files shortlog changelog graph | Fixed calloc invocation in the __newdata function. | |
templates/progops.c (file) |
1.1 --- a/templates/progops.c Mon Oct 31 18:26:36 2016 +0100 1.2 +++ b/templates/progops.c Mon Oct 31 21:50:41 2016 +0100 1.3 @@ -25,7 +25,7 @@ 1.4 1.5 __attr __newdata(__attr args[], unsigned int number) 1.6 { 1.7 - __fragment *data = calloc(sizeof(__attr), number); 1.8 + __fragment *data = calloc(number, sizeof(__attr)); 1.9 __attr attr = {0, .data=data}; 1.10 unsigned int i, j; 1.11