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>
Martin Ågren committed
Oct 5, 2017 at 22:32 UTC
5de134ca8594de22f2a0b738824f9b5176ae6c00
1 file changed
+4
-4
tempfile.h
+4
-4
@@ -68,10 +68,10 @@
68
* `create_tempfile()` returns an allocated tempfile on success or NULL
69
* on failure. On errors, `errno` describes the reason for failure.
70
*
71
- * `delete_tempfile()`, `rename_tempfile()`, and `close_tempfile_gently()`
72
- * return 0 on success. On failure they set `errno` appropriately and return
73
- * -1. `delete` and `rename` (but not `close`) do their best to delete the
74
- * temporary file before returning.
71
+ * `rename_tempfile()` and `close_tempfile_gently()` return 0 on success.
72
+ * On failure they set `errno` appropriately and return -1.
73
+ * `delete_tempfile()` and `rename` (but not `close`) do their best to
74
+ * delete the temporary file before returning.
75
*/
76
77
struct tempfile {