wrapper.c: remove/unlink_or_warn: simplify, treat ENOENT as success
[gitweb.git] / git-compat-util.h
index fb41118c0705c628bed093c4a915a58aa01a5a1a..d67592fd969bb8e5cb1401e426f51f9773799461 100644 (file)
@@ -777,11 +777,14 @@ void git_qsort(void *base, size_t nmemb, size_t size,
 
 /*
  * Preserves errno, prints a message, but gives no warning for ENOENT.
- * Always returns the return value of unlink(2).
+ * Returns 0 on success, which includes trying to unlink an object that does
+ * not exist.
  */
 int unlink_or_warn(const char *path);
 /*
- * Likewise for rmdir(2).
+ * Preserves errno, prints a message, but gives no warning for ENOENT.
+ * Returns 0 on success, which includes trying to remove a directory that does
+ * not exist.
  */
 int rmdir_or_warn(const char *path);
 /*