diff options
Diffstat (limited to 'source/cache.c')
| -rw-r--r-- | source/cache.c | 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 2 insertions, 2 deletions
diff --git a/source/cache.c b/source/cache.c index 60e071b..af391db 100644 --- a/source/cache.c +++ b/source/cache.c @@ -85,7 +85,7 @@ static int open_slot(struct cache_slot *slot) if (fstat(slot->cache_fd, &slot->st)) return errno; - slot->buflen = xread(slot->cache_fd, slot->buf, sizeof(slot->buf)); + slot->buflen = read_in_full(slot->cache_fd, slot->buf, sizeof(slot->buf)); if (slot->buflen < 0) return errno; @@ -265,7 +265,7 @@ static int lock_slot(struct cache_slot *slot) // start from empty now that nobody else can be writing it. if (ftruncate(slot->lock_fd, 0) < 0) return errno; - if (xwrite(slot->lock_fd, slot->key, slot->keylen + 1) < 0) + if (write_in_full(slot->lock_fd, slot->key, slot->keylen + 1) < 0) return errno; return 0; } |
