From: Swen Schillig Date: Tue, 13 Mar 2018 07:57:40 +0000 (+0100) Subject: ctdb: Remove double sanity checks from ctdb_daemon_read_cb X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=c42c721b980d87588513751c12f8bb9f88e28cd5 ctdb: Remove double sanity checks from ctdb_daemon_read_cb Within ctdb_daemon_read_cb the provided data is checked for sanity, e.g. correct size and content. This is not required because it was done already by the caller (queue_process). Signed-off-by: Swen Schillig Reviewed-by: Martin Schwenke Reviewed-by: Jeremy Allison --- diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 6d2f70f99b62..3b06972d030e 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -895,11 +895,6 @@ static void ctdb_daemon_read_cb(uint8_t *data, size_t cnt, void *args) return; } hdr = (struct ctdb_req_header *)data; - if (cnt != hdr->length) { - ctdb_set_error(client->ctdb, "Bad header length %u expected %u\n in daemon", - (unsigned)hdr->length, (unsigned)cnt); - return; - } if (hdr->ctdb_magic != CTDB_MAGIC) { ctdb_set_error(client->ctdb, "Non CTDB packet rejected\n");