diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Align with spaces instead of tabs
Diffstat (limited to 'source/cache.c')
-rw-r--r--source/cache.c14
1 file changed, 7 insertions, 7 deletions
diff --git a/source/cache.c b/source/cache.c
index 0c86210..091c078 100644
--- a/source/cache.c
+++ b/source/cache.c
@@ -90,8 +90,8 @@ static int open_slot(struct cache_slot *slot)
if (slot->key)
slot->key_matches =
- keylen >= 0 &&
- (size_t)keylen == slot->keylen &&
+ keylen >= 0 &&
+ (size_t)keylen == slot->keylen &&
!memcmp(slot->key, slot->buf, keylen + 1);
return 0;
@@ -193,8 +193,8 @@ static int is_modified(struct cache_slot *slot)
if (stat(slot->path, &current))
return 1;
return (
- current.st_ino != slot->st.st_ino ||
- current.st_mtime != slot->st.st_mtime ||
+ current.st_ino != slot->st.st_ino ||
+ current.st_mtime != slot->st.st_mtime ||
current.st_size != slot->st.st_size
);
}
@@ -242,9 +242,9 @@ static int lock_slot(struct cache_slot *slot)
// slot, and once the path is confirmed to still name this file that
// rename can no longer happen, because it takes the lock held here.
if (
- fstat(slot->lock_fd, &held) ||
- stat(slot->lock_path, &named) ||
- held.st_ino != named.st_ino ||
+ fstat(slot->lock_fd, &held) ||
+ stat(slot->lock_path, &named) ||
+ held.st_ino != named.st_ino ||
held.st_dev != named.st_dev
) {
close(slot->lock_fd);