On Mon, 30 Oct 2017 19:11:46 +0100 Thomas Egerer <thomas.ege...@secunet.com> wrote:
> > + if (tb[XFRMA_MARK]) { > + int r = addattr_l(new_n, xb->size, XFRMA_MARK, > + (void *)RTA_DATA(tb[XFRMA_MARK]), > tb[XFRMA_MARK]->rta_len); Since addattr_l already uses const void * for the attribute argument, the cast here is unnecessary. Also try and break long lines if possible. Also, you should probably be using RTA_PAYLOAD() rather than dereferncing rta_len here.