diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-14 08:58:05 -0400 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2018-08-11 17:14:58 +0200 | 
| commit | 0ce1ca805d607cec2c0f75dac8950f40e75fc971 (patch) | |
| tree | bf34e7a0084ae76089d43ee7f2c4ca8eeed62c8a /pimd/pim_igmpv3.c | |
| parent | 1408cdfc07202b2c3e31ad2ef40fae0e8a31e8c0 (diff) | |
*: 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.c | 31 | 
1 files changed, 0 insertions, 31 deletions
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index b32d71cc0d..132fe4d564 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);  | 
