Download raw body.
diff: 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. - Tom diff --git a/lib/diff_debug.h b/lib/diff_debug.h index 0ed8a5e..4b7ec80 100644 --- a/lib/diff_debug.h +++ b/lib/diff_debug.h @@ -58,8 +58,6 @@ dump_atom(const struct diff_data *left, const struct diff_data *right, 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;
diff: fread cannot return -1