From 140a0e053719e1482211d5937c73e6303c2397bd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 9 Oct 2018 13:15:22 +0200 Subject: [PATCH] gencache: Swap tests: Do cheapest first Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/lib/gencache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index 8919a165745..895c9cc05a7 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -273,13 +273,13 @@ bool gencache_set_data_blob(const char *keystr, DATA_BLOB blob, static int writecount; TDB_DATA dbufs[2]; - if (tdb_data_cmp(string_term_tdb_data(keystr), - last_stabilize_key()) == 0) { - DEBUG(10, ("Can't store %s as a key\n", keystr)); + if ((keystr == NULL) || (blob.data == NULL)) { return false; } - if ((keystr == NULL) || (blob.data == NULL)) { + if (tdb_data_cmp(string_term_tdb_data(keystr), + last_stabilize_key()) == 0) { + DEBUG(10, ("Can't store %s as a key\n", keystr)); return false; } -- 2.34.1