summaryrefslogtreecommitdiffstats
path: root/src/cache.c
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-10-07 17:41:26 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-10-18 16:06:22 +0200
commit5cb824d4aca7fea9ed58325933e1eb4f1afcb9b3 (patch)
tree94f182aa40f5f092b0c3653eb29107215e8bdc3a /src/cache.c
parent5179f5d383f99121bf4085af4b9354638e4e168c (diff)
More documentation and cache access control
Change-Id: Id040ad44f862c212057a854ebaf5798da5b064b9 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/cache.c')
-rw-r--r--src/cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c
index c3f83cc..c19cc66 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -338,7 +338,7 @@ cache_clear(
cache_t *cache,
uint32_t cacheid
) {
- if (cache && (!cacheid || cache->cacheid != cacheid)) {
+ if (cache && (cache->cacheid != cacheid || !cacheid)) {
cache->cacheid = cacheid;
cache->used = 0;
}