Author: cazfi Date: Sat Jan 23 20:17:50 2016 New Revision: 31559 URL: http://svn.gna.org/viewcvs/freeciv?rev=31559&view=rev Log: Changed type of xz-compressed file read and write amounts from ssize_t to size_t.
See bug #24332 Modified: branches/S2_5/utility/ioz.c Modified: branches/S2_5/utility/ioz.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/utility/ioz.c?rev=31559&r1=31558&r2=31559&view=diff ============================================================================== --- branches/S2_5/utility/ioz.c (original) +++ branches/S2_5/utility/ioz.c Sat Jan 23 20:17:50 2016 @@ -487,7 +487,7 @@ int i, j; for (i = 0; i < size - 1; i += j) { - ssize_t len = 0; + size_t len = 0; bool line_end; for (j = 0, line_end = FALSE; fp->u.xz.out_avail > 0 @@ -507,7 +507,7 @@ } if (fp->u.xz.hack_byte_used) { - ssize_t hblen = 0; + size_t hblen = 0; fp->u.xz.in_buf[0] = fp->u.xz.hack_byte; len = fread(fp->u.xz.in_buf + 1, 1, PLAIN_FILE_BUF_SIZE - 1, @@ -517,11 +517,11 @@ if (len <= 1) { hblen = fread(&fp->u.xz.hack_byte, 1, 1, fp->u.xz.plain); } - if (hblen <= 0) { + if (hblen == 0) { fp->u.xz.hack_byte_used = FALSE; } } - if (len <= 0) { + if (len == 0) { if (fp->u.xz.error == LZMA_STREAM_END) { if (i + j == 0) { /* Plain file read complete, and there was nothing in xz buffers @@ -634,8 +634,8 @@ static bool xz_outbuffer_to_file(fz_FILE *fp, lzma_action action) { do { - ssize_t len; - ssize_t total = 0; + size_t len; + size_t total = 0; fp->u.xz.error = lzma_code(&fp->u.xz.stream, action); @@ -648,7 +648,7 @@ PLAIN_FILE_BUF_SIZE - fp->u.xz.stream.avail_out - total, fp->u.xz.plain); total += len; - if (len <= 0) { + if (len == 0) { return FALSE; } } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits