summaryrefslogtreecommitdiffstats
path: root/pimd/pim_igmpv3.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-14 14:58:05 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-08-11 17:14:58 +0200
commit0ce1ca805d607cec2c0f75dac8950f40e75fc971 (patch)
treebf34e7a0084ae76089d43ee7f2c4ca8eeed62c8a /pimd/pim_igmpv3.c
parentMerge pull request #2809 from opensourcerouting/routemap-rpki-fix (diff)
downloadfrr-0ce1ca805d607cec2c0f75dac8950f40e75fc971.tar.xz
frr-0ce1ca805d607cec2c0f75dac8950f40e75fc971.zip
*: ALLOC calls cannot fail
There is no need to check for failure of a ALLOC call as that any failure to do so will result in a assert happening. So we can safely remove all of this code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_igmpv3.c')
-rw-r--r--pimd/pim_igmpv3.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c
index b32d71cc0..132fe4d56 100644
--- a/pimd/pim_igmpv3.c
+++ b/pimd/pim_igmpv3.c
@@ -486,9 +486,6 @@ static struct igmp_source *add_source_by_addr(struct igmp_sock *igmp,
}
src = source_new(group, src_addr);
- if (!src) {
- return 0;
- }
return src;
}
@@ -579,10 +576,6 @@ static void isex_excl(struct igmp_group *group, int num_sources,
/* E.4: if not found, create source with timer=GMI:
* (A-X-Y) */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
igmp_source_reset_gmi(group->group_igmp_sock, group,
source);
@@ -637,10 +630,6 @@ static void isex_incl(struct igmp_group *group, int num_sources,
/* I.4: if not found, create source with timer=0 (B-A)
*/
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* (B-A) timer=0 */
}
@@ -720,10 +709,6 @@ static void toin_incl(struct igmp_group *group, int num_sources,
} else {
/* If not found, create new source */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
}
/* (B)=GMI */
@@ -765,10 +750,6 @@ static void toin_excl(struct igmp_group *group, int num_sources,
} else {
/* If not found, create new source */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
}
/* (A)=GMI */
@@ -854,10 +835,6 @@ static void toex_incl(struct igmp_group *group, int num_sources,
/* If source not found, create source with timer=0:
* (B-A)=0 */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* (B-A) timer=0 */
}
@@ -917,10 +894,6 @@ static void toex_excl(struct igmp_group *group, int num_sources,
* (A-X-Y)=Group Timer */
long group_timer_msec;
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
group_timer_msec = igmp_group_timer_remain_msec(group);
@@ -1431,10 +1404,6 @@ static void block_excl(struct igmp_group *group, int num_sources,
* (A-X-Y)=Group Timer */
long group_timer_msec;
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
group_timer_msec = igmp_group_timer_remain_msec(group);