summaryrefslogtreecommitdiff
path: root/lockfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lockfile.c')
-rw-r--r--lockfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lockfile.c b/lockfile.c
index 3dbb2d1..eb931ed 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;
}