X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=lockfile.c;h=eb931eded5a6ed20f1d80dadf08cbb8009d85767;hb=d00e364de99d51bb76e437820e23cfa820417ec5;hp=3dbb2d1ff9407a7417be294adedc5312e7421a96;hpb=869e13e2466bd047e6e624f69c01c8561b989b7c;p=git.git diff --git a/lockfile.c b/lockfile.c index 3dbb2d1ff..eb931eded 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; }