commit f06465966b88928c2801b7d9ecb36c3a7c5e36b4 from: Omar Polo date: Thu May 18 09:01:32 2023 UTC gotwebd: avoid needless double fseek() got_gotweb_closefile() already takes care of rewinding before truncating and closing, so no need to replicate here. ok stsp@ commit - 8a078d7f1359fdf37e7bc18d6ace3c3579b98b33 commit + f06465966b88928c2801b7d9ecb36c3a7c5e36b4 blob - ed987b10276ab43077d34ad182e40d494811d709 blob + d5a00b94081cc1867b1806eab44247435884f343 --- gotwebd/got_operations.c +++ gotwebd/got_operations.c @@ -1228,17 +1228,7 @@ got_open_diff_for_output(FILE **fp, struct request *c) error = got_error(GOT_ERR_OBJ_TYPE); } if (error) - goto done; - - if (fseek(f1, 0, SEEK_SET) == -1) { - error = got_ferror(f1, GOT_ERR_IO); - goto done; - } - - if (fseek(f2, 0, SEEK_SET) == -1) { - error = got_ferror(f2, GOT_ERR_IO); goto done; - } if (fseek(f3, 0, SEEK_SET) == -1) { error = got_ferror(f3, GOT_ERR_IO);