From b8f7f42565d35e20ba576db101bd5eb27f90e903 Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Tue, 13 Mar 2018 09:22:45 +0100 Subject: [PATCH] ctdb: Remove double sanity checks from ctdb_tcp_read_cb Within ctdb_tcp_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 Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Wed Apr 4 09:31:04 CEST 2018 on sn-devel-144 --- ctdb/tcp/tcp_io.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c index 3c3b1c167f32..0eb8e25eea3a 100644 --- a/ctdb/tcp/tcp_io.c +++ b/ctdb/tcp/tcp_io.c @@ -56,13 +56,6 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args) goto failed; } - - if (cnt != hdr->length) { - DEBUG(DEBUG_ALERT,(__location__ " Bad header length %u expected %u\n", - (unsigned)hdr->length, (unsigned)cnt)); - goto failed; - } - if (hdr->ctdb_magic != CTDB_MAGIC) { DEBUG(DEBUG_ALERT,(__location__ " Non CTDB packet 0x%x rejected\n", hdr->ctdb_magic)); -- 2.34.1