tempfile: fix documentation on `delete_tempfile()`
The function has always been documented as returning 0 or -1. It is in fact `void`. Correct that. As part of the rearrangements we lose the mention that `delete_tempfile()` might set `errno`. Because there is no return value, the user can't really know whether it did anyway. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
d613576dfe
commit
5de134ca85
|
@ -68,10 +68,10 @@
|
||||||
* `create_tempfile()` returns an allocated tempfile on success or NULL
|
* `create_tempfile()` returns an allocated tempfile on success or NULL
|
||||||
* on failure. On errors, `errno` describes the reason for failure.
|
* on failure. On errors, `errno` describes the reason for failure.
|
||||||
*
|
*
|
||||||
* `delete_tempfile()`, `rename_tempfile()`, and `close_tempfile_gently()`
|
* `rename_tempfile()` and `close_tempfile_gently()` return 0 on success.
|
||||||
* return 0 on success. On failure they set `errno` appropriately and return
|
* On failure they set `errno` appropriately and return -1.
|
||||||
* -1. `delete` and `rename` (but not `close`) do their best to delete the
|
* `delete_tempfile()` and `rename` (but not `close`) do their best to
|
||||||
* temporary file before returning.
|
* delete the temporary file before returning.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct tempfile {
|
struct tempfile {
|
||||||
|
|
Loading…
Reference in New Issue