ctdb-server: Avoid logging a count of 0 resent calls
authorMartin Schwenke <mschwenke@ddn.com>
Thu, 15 Jun 2023 00:31:07 +0000 (10:31 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 10 Jul 2023 15:15:06 +0000 (15:15 +0000)
This fixes a little thinko in commit
80de84d36e9c29d9506976f991560fb5dde99471, where this was overlooked.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Jul 10 15:15:06 UTC 2023 on atb-devel-224

ctdb/server/ctdb_call.c

index cef271958c5fff54d2badcf353681a754be94263..a51a92d3e45603005650788f9fd88673657e178c 100644 (file)
@@ -1417,6 +1417,10 @@ void ctdb_call_resend_db(struct ctdb_db_context *ctdb_db)
                ctdb_call_resend(state);
                count++;
        }
+       /* Avoid logging a 0 count below */
+       if (count == 0) {
+               return;
+       }
        D_NOTICE("Resent calls for database=%s, generation=%u, count=%u\n",
                 ctdb_db->db_name,
                 ctdb_db->generation,