From 99c8e4b341d886595fedf0a7c03dfd95b16c01ad Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Thu, 25 Feb 2021 17:30:10 +0200 Subject: 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 --- src/cache.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3