]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: remove unneeded memset from a very hot function
authorPaul Jakma <paul@jakma.org>
Thu, 14 Jan 2010 13:19:40 +0000 (16:19 +0300)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 14 Jan 2010 13:19:40 +0000 (16:19 +0300)
* 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.

ospfd/ospf_lsdb.c

index 2e1bdedffe973896d8930d9fb0d4f5ba34b8404b..c906f05283b6ddcac750dcee31b8c26170762ff4 100644 (file)
@@ -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;