From: David Lamparter Date: Thu, 7 Sep 2017 13:28:35 +0000 (+0200) Subject: bgpd: remove transit_dup() & cluster_dup() X-Git-Tag: frr-4.0-dev~327^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=821127e041849eacca89d052d543f50a02124823;p=mirror%2Ffrr.git bgpd: remove transit_dup() & cluster_dup() These are now unused. route-maps can't modify these attributes, so there is no need for _dup functions. Signed-off-by: David Lamparter --- diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 338fb6cd40..fe43afeb39 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -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. */