diff options
author | 2021-02-25 17:27:26 +0200 | |
---|---|---|
committer | 2021-02-25 17:27:26 +0200 | |
commit | 2daea54cac437e34b2c5223cfc33387d3a7aee28 (patch) | |
tree | bee68d51747994bede9edd7d8f657aecdb387c1e /src/cache.c | |
parent | 361c1a693c50e42df849f5d68642552d4a99aa4a (diff) | |
download | algos-ld1-2daea54cac437e34b2c5223cfc33387d3a7aee28.tar.gz algos-ld1-2daea54cac437e34b2c5223cfc33387d3a7aee28.tar.bz2 algos-ld1-2daea54cac437e34b2c5223cfc33387d3a7aee28.zip |
get rid of pnode, t'was unused.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cache.c b/src/cache.c index 19c5a92..5443e28 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ -/* Copyright (C) 2020 Gediminas Jakutis */ +/* Copyright (C) 2020-2021 Gediminas Jakutis */ #include <errno.h> #include <stdlib.h> @@ -230,15 +230,13 @@ int cached_put_list(struct stream * const restrict in, const struct entry_l * co int ret = 0; if (!in->cnode) { /* if this is the very first one */ - in->pnode = NULL; in->cnode = in->cache_l; in->cnode->val = node->val; in->cnode->next = NULL; in->index = 0; } else { - in->pnode = in->cnode; - in->cnode = in->cnode + 1; /* lol says librin, lmao */ - in->pnode->next = in->cnode; + in->cnode->next = in->cnode + 1; /* lol says librin, lmao */ + in->cnode = in->cnode->next; in->cnode->val = node->val; in->cnode->next = NULL; ++in->index; @@ -251,7 +249,6 @@ int cache_rewind(struct stream * const in) { int ret = 0; - in->pnode = NULL; in->cnode = in->cnode ? in->cache_l : NULL; in->index = 0; |