mbuf: fix type of variables in linearize function