diff options
author | Lukas Fleischer | 2013-03-03 16:04:29 +0100 |
---|---|---|
committer | Lukas Fleischer | 2013-03-04 01:12:48 +0100 |
commit | 53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (patch) | |
tree | 97e6fa2e4e7300f55a180917059b71e566c260fe /cache.c | |
parent | 7f4e8c33aeb65bdc5695c9fd13ec1ceb100303c7 (diff) | |
download | cgit-53bc747d311d18642fa3ad0cc0de34f3899ed1f4.tar.gz cgit-53bc747d311d18642fa3ad0cc0de34f3899ed1f4.tar.bz2 cgit-53bc747d311d18642fa3ad0cc0de34f3899ed1f4.zip |
Fix several whitespace errors
* Remove whitespace at the end of lines.
* Replace space indentation by tabs.
* Add whitespace before/after several operators ("+", "-", "*", ...)
* Add whitespace to assignments ("foo = bar;").
* Fix whitespace in parameter lists ("foobar(foo, bar, 42)").
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Diffstat (limited to 'cache.c')
-rw-r--r-- | cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -105,7 +105,7 @@ static int is_expired(struct cache_slot *slot) | |||
105 | if (slot->ttl < 0) | 105 | if (slot->ttl < 0) |
106 | return 0; | 106 | return 0; |
107 | else | 107 | else |
108 | return slot->cache_st.st_mtime + slot->ttl*60 < time(NULL); | 108 | return slot->cache_st.st_mtime + slot->ttl * 60 < time(NULL); |
109 | } | 109 | } |
110 | 110 | ||
111 | /* Check if the slot has been modified since we opened it. | 111 | /* Check if the slot has been modified since we opened it. |
@@ -141,8 +141,8 @@ static int close_lock(struct cache_slot *slot) | |||
141 | */ | 141 | */ |
142 | static int lock_slot(struct cache_slot *slot) | 142 | static int lock_slot(struct cache_slot *slot) |
143 | { | 143 | { |
144 | slot->lock_fd = open(slot->lock_name, O_RDWR|O_CREAT|O_EXCL, | 144 | slot->lock_fd = open(slot->lock_name, O_RDWR | O_CREAT | O_EXCL, |
145 | S_IRUSR|S_IWUSR); | 145 | S_IRUSR | S_IWUSR); |
146 | if (slot->lock_fd == -1) | 146 | if (slot->lock_fd == -1) |
147 | return errno; | 147 | return errno; |
148 | if (xwrite(slot->lock_fd, slot->key, slot->keylen + 1) < 0) | 148 | if (xwrite(slot->lock_fd, slot->key, slot->keylen + 1) < 0) |