aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-04-29 00:31:12 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-05-01 04:13:25 +0200
commitcfd0a6f7743494f63c6ac5af15bbd3e762591961 (patch)
tree81ce39d9d5b88dbeacb54875983efdf5ff6bb3fc /main.c
parenta557091ad1fd5906ee8b846755a7b88a9e35f4f7 (diff)
downloadslcl-cfd0a6f7743494f63c6ac5af15bbd3e762591961.tar.gz
Return error if write_ctx_free fails
Otherwise, write_body_mem and write_body_mem would silently fail, causing undefined behaviour. Notes: The return value for write_ctx_free is currently assigned to that of fclose(3), which can be either 0 on success or EOF on failure. However, it makes sense for write_body_mem and write_body_mem to simply check against non-zero. Also, it would not be sensible to return EOF to caller functions, which expect either 0 (success), -1 (fatal error) or 1 (input error).
Diffstat (limited to 'main.c')
0 files changed, 0 insertions, 0 deletions