aboutsummaryrefslogtreecommitdiff
path: root/entries/adirar111/c-filesystem/fib-fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'entries/adirar111/c-filesystem/fib-fs.c')
-rw-r--r--entries/adirar111/c-filesystem/fib-fs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/entries/adirar111/c-filesystem/fib-fs.c b/entries/adirar111/c-filesystem/fib-fs.c
index d07c205..73126b6 100644
--- a/entries/adirar111/c-filesystem/fib-fs.c
+++ b/entries/adirar111/c-filesystem/fib-fs.c
@@ -119,14 +119,13 @@ long fib(long n) {
if (is_in_cache(list_of_files, size_of_lof, n)) {
free(list_of_files);
- long cached_value = read_from_cache(path);
- return cached_value;
+ return read_from_cache(path);
}
free(list_of_files);
- long toCache = fib(n-1) + fib(n-2);
- write_to_cache(path, toCache);
- return toCache;
+ long to_cache = fib(n-1) + fib(n-2);
+ write_to_cache(path, to_cache);
+ return to_cache;
}