summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-03-15 14:34:53 (GMT)
committerThomas Haller <thaller@redhat.com>2022-03-16 23:09:46 (GMT)
commit620d024d00921bfdd5a5a957713d1431aa4a74f2 (patch)
treedc1e26c91ecfb7b097fee088f09bda04adfce1c3
parent93a02eb67b1adc6eaaa539148150d2df683a1cfe (diff)
downloadlibnl-620d024d00921bfdd5a5a957713d1431aa4a74f2.zip
libnl-620d024d00921bfdd5a5a957713d1431aa4a74f2.tar.gz
libnl-620d024d00921bfdd5a5a957713d1431aa4a74f2.tar.bz2
route: drop unnecessary oo_clone() implementation from netconf
If the object has no complex data (pointers!), then the base implementation using memcpy() is enough. No need to implement oo_clone().
-rw-r--r--lib/route/netconf.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/route/netconf.c b/lib/route/netconf.c
index ac76df8..50c91bf 100644
--- a/lib/route/netconf.c
+++ b/lib/route/netconf.c
@@ -74,16 +74,6 @@ static struct rtnl_netconf *rtnl_netconf_alloc(void)
return (struct rtnl_netconf *) nl_object_alloc(&netconf_obj_ops);
}
-static int netconf_clone(struct nl_object *_dst, struct nl_object *_src)
-{
- struct rtnl_netconf *dst = nl_object_priv(_dst);
- struct rtnl_netconf *src = nl_object_priv(_src);
-
- *dst = *src;
-
- return 0;
-}
-
static int netconf_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who,
struct nlmsghdr *nlh, struct nl_parser_param *pp)
{
@@ -528,7 +518,6 @@ int rtnl_netconf_get_input(struct rtnl_netconf *nc, int *val)
static struct nl_object_ops netconf_obj_ops = {
.oo_name = "route/netconf",
.oo_size = sizeof(struct rtnl_netconf),
- .oo_clone = netconf_clone,
.oo_dump = {
[NL_DUMP_LINE] = netconf_dump_line,
[NL_DUMP_DETAILS] = netconf_dump_line,