rtnetlink: move type calculation out of loop

I don't see how the type - which is one of
RTM_{GETADDR,GETROUTE,GETNETCONF} - can change. So do the message type
calculation once before entering the for loop.

Signed-off-by: Christian Brauner <christian@brauner.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Christian Brauner 2018-09-04 21:53:51 +02:00 • committed by David S. Miller
commit 87ccbb1f94