Clean useless cast and improve handle_unsol_req readability

Signed-off-by: Miia Leinonen <miia.leinonen@oss.tieto.com>