Changeset d5c1051 in mainline for uspace/lib/trackmod/xm.c
- Timestamp:
- 2017-12-20T22:25:34Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 39b54fe
- Parents:
- 8610c2c
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:22:29)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:25:34)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/trackmod/xm.c
r8610c2c rd5c1051 174 174 long seek_amount; 175 175 int rc; 176 int ret; 176 177 177 178 module->pattern = calloc(sizeof(trackmod_pattern_t), module->patterns); … … 182 183 183 184 for (i = 0; i < module->patterns; i++) { 184 r c= fread(&pattern, 1, sizeof(xm_pattern_t), f);185 if (r c!= sizeof(xm_pattern_t)) {185 ret = fread(&pattern, 1, sizeof(xm_pattern_t), f); 186 if (ret != sizeof(xm_pattern_t)) { 186 187 rc = EIO; 187 188 goto error; … … 297 298 long pos; 298 299 int rc; 300 int ret; 299 301 300 302 module->instrs = uint16_t_le2host(xm_hdr->instruments); … … 305 307 for (i = 0; i < module->instrs; i++) { 306 308 pos = ftell(f); 307 r c= fread(&instr, 1, sizeof(xm_instr_t), f);308 if (r c!= sizeof(xm_instr_t)) {309 ret = fread(&instr, 1, sizeof(xm_instr_t), f); 310 if (ret != sizeof(xm_instr_t)) { 309 311 rc = EIO; 310 312 goto error; … … 315 317 316 318 if (samples > 0) { 317 r c= fread(&instrx, 1, sizeof(xm_instr_ext_t), f);318 if (r c!= sizeof(xm_instr_ext_t)) {319 ret = fread(&instrx, 1, sizeof(xm_instr_ext_t), f); 320 if (ret != sizeof(xm_instr_ext_t)) { 319 321 rc = EIO; 320 322 goto error; … … 346 348 pos = ftell(f); 347 349 348 r c= fread(&smp, 1, sizeof(xm_smp_t), f);349 if (r c!= sizeof(xm_smp_t)) {350 ret = fread(&smp, 1, sizeof(xm_smp_t), f); 351 if (ret != sizeof(xm_smp_t)) { 350 352 rc = EIO; 351 353 goto error;
Note:
See TracChangeset
for help on using the changeset viewer.