aboutsummaryrefslogtreecommitdiff
path: root/entries/adirar111/c-filesystem
diff options
context:
space:
mode:
authorAymen Dirar2022-10-25 03:50:49 +0000
committerAymen Dirar2022-10-25 03:50:49 +0000
commit316a252403ab4fdda81bc34528625cd28dca9c0a (patch)
tree4ccac5b724b1417421f6f8ce775e54aa757af8e7 /entries/adirar111/c-filesystem
parentf1dc8976a325442c616e05dc4ba9df887f859292 (diff)
cleanup
Diffstat (limited to 'entries/adirar111/c-filesystem')
-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;
}