From: iceman1001 Date: Tue, 19 Jan 2016 18:32:10 +0000 (+0100) Subject: FIX: Coverity Scan says fgetc() returns a INT, X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/5f5aa82bb90ee48934e007c628e935ba58d2f080 FIX: Coverity Scan says fgetc() returns a INT, --- diff --git a/client/fpga_compress.c b/client/fpga_compress.c index 9bafead9..6af1846e 100644 --- a/client/fpga_compress.c +++ b/client/fpga_compress.c @@ -77,7 +77,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) uint8_t *fpga_config; uint32_t i; int ret; - uint8_t c; + int c; z_stream compressed_fpga_stream; fpga_config = malloc(num_infiles * FPGA_CONFIG_SIZE); @@ -99,7 +99,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) for(uint16_t k = 0; k < FPGA_INTERLEAVE_SIZE; k++) { c = fgetc(infile[j]); if (!feof(infile[j])) { - fpga_config[i++] = c; + fpga_config[i++] = c &0xFF; } else if (num_infiles > 1) { fpga_config[i++] = '\0'; }