Merge pull request #2091 from nvx/misc_cleanups

Misc cleanups
This commit is contained in:
Iceman 2023-08-24 08:38:20 +02:00 committed by GitHub
commit 5a56504fc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 500 additions and 481 deletions

View file

@ -857,4 +857,4 @@ int main(int argc, const char *argv[]) {
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -1143,4 +1143,4 @@ int main(int argc, const char *argv[]) {
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -262,7 +262,7 @@ static int zlib_decompress(FILE *infile, FILE *outfiles[], uint8_t num_outfiles,
for (uint16_t j = 0; j < num_outfiles; j++) {
if (k * FPGA_INTERLEAVE_SIZE < outfilesizes[j]) {
uint16_t chunk = (outfilesizes[j] - (k * FPGA_INTERLEAVE_SIZE) < FPGA_INTERLEAVE_SIZE) ?
outfilesizes[j] - (k * FPGA_INTERLEAVE_SIZE) : FPGA_INTERLEAVE_SIZE;
outfilesizes[j] - (k * FPGA_INTERLEAVE_SIZE) : FPGA_INTERLEAVE_SIZE;
fwrite(outbufall + offset, chunk, sizeof(char), outfiles[j]);
}