ctdb: Replace calculation of bytes to read from socket by MIN() macro