summaryrefslogtreecommitdiff
path: root/tempfile.h
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2017-10-05 20:32:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-06 01:07:18 (GMT)
commit5de134ca8594de22f2a0b738824f9b5176ae6c00 (patch)
treeba4db9a54b761591130efb8c48c826ec09769214 /tempfile.h
parentd613576dfe7010b13157e63b2401d321074bbab8 (diff)
downloadgit-5de134ca8594de22f2a0b738824f9b5176ae6c00.zip
git-5de134ca8594de22f2a0b738824f9b5176ae6c00.tar.gz
git-5de134ca8594de22f2a0b738824f9b5176ae6c00.tar.bz2
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>
Diffstat (limited to 'tempfile.h')
-rw-r--r--tempfile.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tempfile.h b/tempfile.h
index b8f4b5e..450908b 100644
--- a/tempfile.h
+++ b/tempfile.h
@@ -68,10 +68,10 @@
* `create_tempfile()` returns an allocated tempfile on success or NULL
* on failure. On errors, `errno` describes the reason for failure.
*
- * `delete_tempfile()`, `rename_tempfile()`, and `close_tempfile_gently()`
- * return 0 on success. On failure they set `errno` appropriately and return
- * -1. `delete` and `rename` (but not `close`) do their best to delete the
- * temporary file before returning.
+ * `rename_tempfile()` and `close_tempfile_gently()` return 0 on success.
+ * On failure they set `errno` appropriately and return -1.
+ * `delete_tempfile()` and `rename` (but not `close`) do their best to
+ * delete the temporary file before returning.
*/
struct tempfile {