net: Eliminate duplicated codes by creating one new function in_dev_select_addr
authorGao Feng <fgao@ikuai8.com>
Fri, 10 Mar 2017 04:38:47 +0000 (12:38 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Mar 2017 06:27:09 +0000 (23:27 -0700)
commit8b57fd1ec13e22b3e722891ff7a6e6ccaf286779
tree7e051e9e2239617718f634c8aeda8f7aca8164b5
parent81663bee1676d1ecbd3281e2c752a1b6f6e133b9
net: Eliminate duplicated codes by creating one new function in_dev_select_addr

There are two duplicated loops codes which used to select right
address in current codes. Now eliminate these codes by creating
one new function in_dev_select_addr.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/devinet.c