From 0f3c70590a50ead0586861e7e10ec806b5e110f6 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Mon, 7 Dec 2009 20:51:44 +0100 Subject: Use the available local to shorten the code. The cache aging loop already stored the next linked list element in a local variable, so we can join the list prior to eviction using that instead of dereferencing the element to be evicted again. The loop is small enough that I think the referent is clear and it makes the statements shorter. This version also works if the eviction happens prior to the list update, as was the case prior to the recent cleanup. --- mupdf/pdf_store.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mupdf/pdf_store.c b/mupdf/pdf_store.c index e87611ad..09a4f849 100644 --- a/mupdf/pdf_store.c +++ b/mupdf/pdf_store.c @@ -175,9 +175,9 @@ pdf_evictageditems(pdf_store *store) if (item->age > itemmaxage(item->kind)) { if (!prev) - store->root = item->next; + store->root = next; else - prev->next = item->next; + prev->next = next; evictitem(item); } else -- cgit v1.2.3