Changeset 56210a7 in mainline for uspace/lib/trackmod/protracker.c
- Timestamp:
- 2025-01-29T13:06:25Z (11 days ago)
- Branches:
- master
- Children:
- a796812c
- Parents:
- 1fa6292
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-29 13:04:40)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-29 13:06:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/trackmod/protracker.c
r1fa6292 r56210a7 146 146 147 147 cells = module->channels * protracker_pattern_rows; 148 buf = calloc( sizeof(uint32_t), cells);148 buf = calloc(cells, sizeof(uint32_t)); 149 149 150 150 if (buf == NULL) { … … 156 156 module->pattern[i].rows = protracker_pattern_rows; 157 157 module->pattern[i].channels = module->channels; 158 module->pattern[i].data = calloc( sizeof(trackmod_cell_t), cells);158 module->pattern[i].data = calloc(cells, sizeof(trackmod_cell_t)); 159 159 if (module->pattern[i].data == NULL) { 160 160 rc = ENOMEM; … … 326 326 327 327 module->instrs = samples; 328 module->instr = calloc(s izeof(trackmod_instr_t), samples);328 module->instr = calloc(samples, sizeof(trackmod_instr_t)); 329 329 if (module->instr == NULL) { 330 330 printf("Out of memory.\n"); … … 334 334 335 335 module->patterns = patterns; 336 module->pattern = calloc( sizeof(trackmod_pattern_t), patterns);336 module->pattern = calloc(patterns, sizeof(trackmod_pattern_t)); 337 337 if (module->pattern == NULL) { 338 338 printf("Out of memory.\n"); … … 343 343 /* Order list */ 344 344 module->ord_list_len = order_list->order_list_len; 345 module->ord_list = calloc( sizeof(size_t), module->ord_list_len);345 module->ord_list = calloc(module->ord_list_len, sizeof(size_t)); 346 346 if (module->ord_list == NULL) { 347 347 printf("Out of memory.\n");
Note:
See TracChangeset
for help on using the changeset viewer.