From: Jozsef Kadlecsik Date: Sun, 20 Dec 2020 14:07:21 +0000 (+0100) Subject: Fix patch "Handle false warning from -Wstringop-overflow" X-Git-Tag: v7.10~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7db164b227f46c2c52a7f6435cd5a39ac3fbe494;p=thirdparty%2Fipset.git Fix patch "Handle false warning from -Wstringop-overflow" Return code of strscpy() was not handled properly. Signed-off-by: Jozsef Kadlecsik --- diff --git a/kernel/net/netfilter/ipset/ip_set_core.c b/kernel/net/netfilter/ipset/ip_set_core.c index 7ed933d7..63a7955d 100644 --- a/kernel/net/netfilter/ipset/ip_set_core.c +++ b/kernel/net/netfilter/ipset/ip_set_core.c @@ -1360,7 +1360,7 @@ IPSET_CBFN(ip_set_rename, struct net *net, struct sock *ctnl, out: write_unlock_bh(&ip_set_ref_lock); - return ret; + return ret < 0 ? ret : 0; } /* Swap two sets so that name/index points to the other.