Re: [PATCH] ipv6: ICMPV6: Use swap() instead of open coding it

From: Simon Horman
Date: Tue Jan 31 2023 - 07:55:38 EST


On Tue, Jan 31, 2023 at 02:34:56PM +0800, Jiapeng Chong wrote:
> Swap is a function interface that provides exchange function. To avoid
> code duplication, we can use swap function.
>
> ./net/ipv6/icmp.c:344:25-26: WARNING opportunity for swap().
>
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3896
> Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>

Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>