From: Rasmus Villemoes Date: Thu, 8 Jun 2017 08:59:25 +0000 (+0200) Subject: lib/route/cls/u32.c: let the compiler do pointer arithmetic X-Git-Tag: libnl3_4_0rc1~7^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d5ad3938b4f71980709d00b922ad77e132e1a30;p=libnl lib/route/cls/u32.c: let the compiler do pointer arithmetic This is what ->, [] and & are for. --- diff --git a/lib/route/cls/u32.c b/lib/route/cls/u32.c index 2ea9bd4..82b5665 100644 --- a/lib/route/cls/u32.c +++ b/lib/route/cls/u32.c @@ -264,7 +264,7 @@ static void print_selector(struct nl_dump_params *p, struct tc_u32_sel *sel, for (i = 0; i < sel->nkeys; i++) { - key = (struct tc_u32_key *) ((char *) sel + sizeof(*sel)) + i; + key = &sel->keys[i]; nl_dump(p, "\n"); nl_dump_line(p, " match key at %s%u ",