diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-05-25 00:59:07 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-05-25 00:59:07 -0700 |
| commit | ee969693c5e77e1b5ebda45bead569806d31b379 (patch) | |
| tree | 25d803cd17cbe891a9937f3e3442a1d7863ae773 /lockfile.c | |
| parent | 4c8d4c14c6de59bc14d6118724ffee949e8654a7 (diff) | |
| parent | 9619ff14159ab3401636b9883a715b0f20b051df (diff) | |
| download | git-ee969693c5e77e1b5ebda45bead569806d31b379.tar.gz | |
Merge branch 'master' into sb/opt-filename
* master: (654 commits)
http-push.c::remove_locks(): fix use after free
t/t3400-rebase.sh: add more tests to help migrating git-rebase.sh to C
post-receive-email: hooks.showrev: show how to include both web link and patch
MinGW: Fix compiler warning in merge-recursive
MinGW: Add a simple getpass()
MinGW: use POSIX signature of waitpid()
MinGW: the path separator to split GITPERLLIB is ';' on Win32
MinGW: Scan for \r in addition to \n when reading shbang lines
gitweb: Sanitize title attribute in format_subject_html
Terminate argv with NULL before calling setup_revisions()
doc/git-rebase.txt: remove mention of multiple strategies
git-send-email: Handle quotes when parsing .mailrc files
git-svn: add --authors-prog option
git-svn: Set svn.authorsfile if it is passed to git svn clone
git-svn: Correctly report max revision when following deleted paths
git-svn: Fix for svn paths removed > log-window-size revisions ago
git-svn testsuite: use standard configuration for Subversion tools
grep: fix word-regexp colouring
completion: use git rev-parse to detect bare repos
Cope better with a _lot_ of packs
...
Diffstat (limited to 'lockfile.c')
| -rw-r--r-- | lockfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lockfile.c b/lockfile.c index 3dbb2d1ff9..eb931eded5 100644 --- a/lockfile.c +++ b/lockfile.c @@ -16,7 +16,7 @@ static void remove_lock_file(void) lock_file_list->filename[0]) { if (lock_file_list->fd >= 0) close(lock_file_list->fd); - unlink(lock_file_list->filename); + unlink_or_warn(lock_file_list->filename); } lock_file_list = lock_file_list->next; } @@ -109,7 +109,7 @@ static char *resolve_symlink(char *p, size_t s) * link is a relative path, so I must replace the * last element of p with it. */ - char *r = (char*)last_path_elm(p); + char *r = (char *)last_path_elm(p); if (r - p + link_len < s) strcpy(r, link); else { @@ -259,7 +259,7 @@ void rollback_lock_file(struct lock_file *lk) if (lk->filename[0]) { if (lk->fd >= 0) close(lk->fd); - unlink(lk->filename); + unlink_or_warn(lk->filename); } lk->filename[0] = 0; } |
