From: Arnaud Ebalard Date: Tue, 1 Jun 2010 21:35:01 +0000 (+0000) Subject: ipv6: Refactor update of IPv6 flowi destination address for srcrt (RH) option X-Git-Tag: v2.6.36-rc1~571^2~671 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20c59de2e6b6bc74bbf714dcd4e720afe8d516cf;p=pandora-kernel.git ipv6: Refactor update of IPv6 flowi destination address for srcrt (RH) option There are more than a dozen occurrences of following code in the IPv6 stack: if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); final_p = &final; } Replace those with a helper. Note that the helper overrides final_p in all cases. This is ok as final_p was previously initialized to NULL when declared. Signed-off-by: Arnaud Ebalard Signed-off-by: David S. Miller --- Reading git-diff-tree failed