From 1d5ad3938b4f71980709d00b922ad77e132e1a30 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 8 Jun 2017 10:59:25 +0200 Subject: [PATCH] lib/route/cls/u32.c: let the compiler do pointer arithmetic This is what ->, [] and & are for. --- lib/route/cls/u32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ", -- 2.40.0