diff options
author | Ralph Giles <giles@ghostscript.com> | 2009-12-07 20:51:44 +0100 |
---|---|---|
committer | Ralph Giles <giles@ghostscript.com> | 2009-12-07 20:51:44 +0100 |
commit | 0f3c70590a50ead0586861e7e10ec806b5e110f6 (patch) | |
tree | 277266f0c30c47fe0acb0b5c1b372f88db9cbed0 | |
parent | b86f6f361f48f349158e0448c0dd2b7143177bde (diff) | |
download | mupdf-0f3c70590a50ead0586861e7e10ec806b5e110f6.tar.xz |
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.
-rw-r--r-- | mupdf/pdf_store.c | 4 |
1 files 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 |