diff options
Diffstat (limited to 'cache.c')
| -rw-r--r-- | cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -185,6 +185,8 @@ static int lock_slot(struct cache_slot *slot) slot->lock_fd = -1; return saved_errno; } + if (ftruncate(slot->lock_fd, 0) < 0) + return errno; if (xwrite(slot->lock_fd, slot->key, slot->keylen + 1) < 0) return errno; return 0; |
