[exim-cvs] tidying

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] tidying
Gitweb: https://git.exim.org/exim.git/commitdiff/92beef8b1e1c73348d48edbb5cff37b47c4e2f81
Commit:     92beef8b1e1c73348d48edbb5cff37b47c4e2f81
Parent:     9f4001740f061f29c65835c6f7efcab50c27db13
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu Apr 9 14:45:31 2020 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Thu Apr 9 14:45:31 2020 +0100


    tidying
---
 src/src/search.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)


diff --git a/src/src/search.c b/src/src/search.c
index 2a60fc7..d929322 100644
--- a/src/src/search.c
+++ b/src/src/search.c
@@ -545,16 +545,9 @@ else

   else if (do_cache)
     {
-    int len = keylength + 1;
-
-    if (t)    /* Previous, out-of-date cache entry.  Update with the */
-      {     /* new result and forget the old one */
-      e->expiry = do_cache == UINT_MAX ? 0 : time(NULL)+do_cache;
-      e->opts = opts;
-      e->data.ptr = data;
-      }
-    else
+    if (!t) /* No existing entry.  Create new one. */
       {
+      int len = keylength + 1;
       e = store_get(sizeof(expiring_data) + sizeof(tree_node) + len, is_tainted(keystring));
       e->expiry = do_cache == UINT_MAX ? 0 : time(NULL)+do_cache;
       e->opts = opts;
@@ -564,6 +557,11 @@ else
       t->data.ptr = e;
       tree_insertnode(&c->item_cache, t);
       }
+      /* Else previous, out-of-date cache entry.  Update with the */
+      /* new result and forget the old one */
+    e->expiry = do_cache == UINT_MAX ? 0 : time(NULL)+do_cache;
+    e->opts = opts;
+    e->data.ptr = data;
     }


/* If caching was disabled, empty the cache tree. We just set the cache