Commit Diff
- Commit:
c737b93b775d30d7ec96867c4410e122e6167b95
- From:
- Tom Jones <thj@freebsd.org>
- Via:
- tj <tj@enoti.me>
- Date:
- Message:
- fread cannot return -1 fread returns a size_t and can never be -1. fread can signal parameter errors on some platforms, but this isn't portable. Remove this check and break out of the loop when fread returns 0. ok op@
- Actions:
- Patch | Tree
--- lib/diff_debug.h +++ lib/diff_debug.h @@ -58,8 +58,6 @@ dump_atom(const struct diff_data *left, const struct d int i; r = fread(buf, 1, MIN(remain, sizeof(buf)), atom->root->f); - if (r == -1) - abort(); /* cannot return error */ if (r == 0) break; remain -= r;