examples/l3fwd: improve destination lookup readability
authorStephen Hemminger <stephen@networkplumber.org>
Sun, 26 Jan 2020 01:09:11 +0000 (17:09 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 16 Feb 2020 20:07:55 +0000 (21:07 +0100)
commit16f80fd11567442a20848494278002a866eb5773
treeb8d29c8ceda108090f95ed11bae39acbe384add5
parent6e228d781ca808933014b2592c10d81b2780ec28
examples/l3fwd: improve destination lookup readability

The functions to lookup IPv4 and IPv6 were both using opaque
pointers (void *) when they should use a typed pointer instead.
The IP headers are not modified during lookup.

Get rid of unnecessary cast on the return from the function.
Replace complex trigraph expression with simple if to improve
readability.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
examples/l3fwd/l3fwd_lpm.c