diff options
author | 2021-02-25 17:30:10 +0200 | |
---|---|---|
committer | 2021-02-25 17:30:10 +0200 | |
commit | 99c8e4b341d886595fedf0a7c03dfd95b16c01ad (patch) | |
tree | 867932f80bcf19c1126cb58c7ba9ee31fa4059aa /src/cache.c | |
parent | 2daea54cac437e34b2c5223cfc33387d3a7aee28 (diff) | |
download | algos-ld1-99c8e4b341d886595fedf0a7c03dfd95b16c01ad.tar.gz algos-ld1-99c8e4b341d886595fedf0a7c03dfd95b16c01ad.tar.bz2 algos-ld1-99c8e4b341d886595fedf0a7c03dfd95b16c01ad.zip |
get rid of gratuitous extra assignments.
Since we use a union now, the extra assignments are now pointless, even
with -O0 and such.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/cache.c b/src/cache.c index 5443e28..e0852f4 100644 --- a/src/cache.c +++ b/src/cache.c @@ -21,8 +21,7 @@ int cache_create(struct stream * const in) /* yeah... */ in->cache = cache; - in->cache_a = cache; - in->cache_l = cache; + in->cnode = NULL; err: return ret; } @@ -64,8 +63,6 @@ int cache_destroy(struct stream * const in) try(in->settings->access != cached, err, EINVAL, "cannot destroy cache: stream is uncached"); free(in->cache); - in->cache_l = NULL; - in->cache_a = NULL; in->cache = NULL; err: return ret; @@ -80,11 +77,7 @@ int cache_transfer(struct stream * const src, struct stream * const dest) try(dest->cache, err, EINVAL, "cannot transfer cache: recipient cache already exists"); dest->cache = src->cache; - dest->cache_a = (struct entry *) src->cache; - dest->cache_l = (struct entry_l *) src->cache; src->cache = NULL; - src->cache_a = NULL; - src->cache_l = NULL; err: return ret; } |