Rearrange buffer_transfer_bound_data

Avoid to compute useless variable for NULL case

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Avoid to compute variable twice

desttype was already the computed value so use it.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>