Closed tim-griesbach closed 5 months ago
I removed the occurrences of sink->file
by using p4est_connectivity_sink
in p4est_save_ext
.
sc_test_version failed in one CI test. This should be unrelated to the changes in this PR and transient.
Edit: Indeed, after rerunning the CI the failure disappeared.
Ensure C standard compliant
fseek
usageAccording to the C standard (cf. https://wiki.sei.cmu.edu/confluence/display/c/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file), it can not be assumed that seeking to the end of a binary file works in general. However, this was done in
p4est_save_ext
. In concrete terms, the C standard states thatProposed changes: This PR ensures that it is not necessary to seek to the end of a binary file by not closing the file in
p4est_save_ext
after the connectivity was written to disk.