X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=lockfile.h;h=35403ccc0d586c4732411a5813cb97761dddc435;hb=HEAD;hp=90af4e66b28c8f338cb62cf228a2b8d80000e8a8;hpb=99e70f3077a585ed32f37b8ecc863083796d3e72;p=thirdparty%2Fgit.git diff --git a/lockfile.h b/lockfile.h index 90af4e66b2..1bb9926497 100644 --- a/lockfile.h +++ b/lockfile.h @@ -321,11 +321,11 @@ static inline int commit_lock_file_to(struct lock_file *lk, const char *path) * Roll back `lk`: close the file descriptor and/or file pointer and * remove the lockfile. It is a NOOP to call `rollback_lock_file()` * for a `lock_file` object that has already been committed or rolled - * back. + * back. No error will be returned in this case. */ -static inline void rollback_lock_file(struct lock_file *lk) +static inline int rollback_lock_file(struct lock_file *lk) { - delete_tempfile(&lk->tempfile); + return delete_tempfile(&lk->tempfile); } #endif /* LOCKFILE_H */