dispatcher: Avoid casts for raw buffers
Usually buffers to raw data are passed using void* pointers to avoid casts and mark the buffer as raw. Use them for read_safe and write_safe to avoid useless casts in caller code. As a minor convert a parameter to bool as changing the same lines.
Signed-off-by: Frediano Ziglio freddy77@gmail.com