]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: remove transit_dup() & cluster_dup()
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 7 Sep 2017 13:28:35 +0000 (15:28 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 7 Sep 2017 13:29:32 +0000 (15:29 +0200)
These are now unused.  route-maps can't modify these attributes, so
there is no need for _dup functions.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_attr.c

index 338fb6cd4062df1364fa34eb04604d085be75d2b..fe43afeb394996f0872ee9f3926333d7476ee6a6 100644 (file)
@@ -161,22 +161,6 @@ static void cluster_free(struct cluster_list *cluster)
        XFREE(MTYPE_CLUSTER, cluster);
 }
 
-static struct cluster_list *cluster_dup(struct cluster_list *cluster)
-{
-       struct cluster_list *new;
-
-       new = XCALLOC(MTYPE_CLUSTER, sizeof(struct cluster_list));
-       new->length = cluster->length;
-
-       if (cluster->length) {
-               new->list = XMALLOC(MTYPE_CLUSTER_VAL, cluster->length);
-               memcpy(new->list, cluster->list, cluster->length);
-       } else
-               new->list = NULL;
-
-       return new;
-}
-
 static struct cluster_list *cluster_intern(struct cluster_list *cluster)
 {
        struct cluster_list *find;
@@ -422,21 +406,6 @@ static void transit_free(struct transit *transit)
        XFREE(MTYPE_TRANSIT, transit);
 }
 
-static struct transit *transit_dup(struct transit *transit)
-{
-       struct transit *new;
-
-       new = XCALLOC(MTYPE_TRANSIT, sizeof(struct transit));
-       new->length = transit->length;
-       if (new->length) {
-               new->val = XMALLOC(MTYPE_TRANSIT_VAL, transit->length);
-               memcpy(new->val, transit->val, transit->length);
-       } else
-               new->val = NULL;
-
-       return new;
-}
-
 static void *transit_hash_alloc(void *p)
 {
        /* Transit structure is already allocated.  */