commit c737b93b775d30d7ec96867c4410e122e6167b95 from: Tom Jones via: tj date: Tue Oct 11 14:59:40 2022 UTC 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@ commit - 4125b1eff8d9dfcd961dc70ebbd5d54c97bdc3f6 commit + c737b93b775d30d7ec96867c4410e122e6167b95 blob - 0ed8a5e2244549f0bc385a02aa8eb6f5d610deac blob + 4b7ec8090638d2752cd946046f2333347bf244ae --- 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;