summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Jakma <paul@jakma.org>2010-01-14 16:19:40 +0300
committerDenis Ovsienko <infrastation@yandex.ru>2010-01-14 16:19:40 +0300
commitefbbcaf1aea686d118019514dcde92b13c92b0fc (patch)
tree97965a22204c265ac061f40ea9e461e88c3cd2ea
parent0917f7e7c5920b70295c44bd8aad537bc3ee8581 (diff)
ospfd: remove unneeded memset from a very hot function
* ospf_lsdb.c: (lsdb_prefix_set) memset is unneeded, as all fields are initialised explicitly, and this function can be in the top-3 of a profile when there are a lot of LSAs.
-rw-r--r--ospfd/ospf_lsdb.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/ospfd/ospf_lsdb.c b/ospfd/ospf_lsdb.c
index 2e1bdedf..c906f052 100644
--- a/ospfd/ospf_lsdb.c
+++ b/ospfd/ospf_lsdb.c
@@ -75,7 +75,6 @@ ospf_lsdb_cleanup (struct ospf_lsdb *lsdb)
static void
lsdb_prefix_set (struct prefix_ls *lp, struct ospf_lsa *lsa)
{
- memset (lp, 0, sizeof (struct prefix_ls));
lp->family = 0;
lp->prefixlen = 64;
lp->id = lsa->data->id;