[util] Remove use of ssize_t which was failing on MSVC

This commit is contained in:
Behdad Esfahbod 2018-02-10 14:09:06 -06:00
parent bfa871634c
commit 4011d885b7
1 changed files with 3 additions and 3 deletions

View File

@ -72,14 +72,14 @@ struct subset_consumer_t
fprintf(stderr, "Unable to open output file\n"); fprintf(stderr, "Unable to open output file\n");
return false; return false;
} }
ssize_t bytes_written = fwrite(data, 1, data_length, fp_out); int bytes_written = fwrite(data, 1, data_length, fp_out);
if (bytes_written == -1) { if (bytes_written == -1) {
fprintf(stderr, "Unable to write output file\n"); fprintf(stderr, "Unable to write output file\n");
return false; return false;
} }
if (bytes_written != data_length) { if ((unsigned int) bytes_written != data_length) {
fprintf(stderr, "Expected %u bytes written, got %ld\n", data_length, fprintf(stderr, "Expected %u bytes written, got %d\n", data_length,
bytes_written); bytes_written);
return false; return false;
} }