[lttng-tools] Refactor: remove logically dead code
diff mbox series

Message ID 20190920154037.74966-1-jonathan.rajotte-julien@efficios.com
State Accepted, archived
Headers show
Series
  • [lttng-tools] Refactor: remove logically dead code
Related show

Commit Message

Jonathan Rajotte Sept. 20, 2019, 3:40 p.m. UTC
Fixes coverity #1400681

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
---
 src/common/session-descriptor.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Jérémie Galarneau Sept. 20, 2019, 9:22 p.m. UTC | #1
Merged in master and stable-2.11. Thanks!

J?r?mie

On Fri, Sep 20, 2019 at 11:40:37AM -0400, Jonathan Rajotte wrote:
> Fixes coverity #1400681
> 
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
>  src/common/session-descriptor.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/src/common/session-descriptor.c b/src/common/session-descriptor.c
> index 208eb46ff..713731c3e 100644
> --- a/src/common/session-descriptor.c
> +++ b/src/common/session-descriptor.c
> @@ -550,14 +550,8 @@ lttng_session_descriptor_live_create(
>  	struct lttng_session_descriptor_live *descriptor;
>  
>  	descriptor = _lttng_session_descriptor_live_create(name, live_timer_us);
> -	if (!descriptor) {
> -		goto error;
> -	}
>  
>  	return descriptor ? &descriptor->base : NULL;
> -error:
> -	lttng_session_descriptor_destroy(descriptor ? &descriptor->base : NULL);
> -	return NULL;
>  }
>  
>  struct lttng_session_descriptor *
> -- 
> 2.17.1
>

Patch
diff mbox series

diff --git a/src/common/session-descriptor.c b/src/common/session-descriptor.c
index 208eb46ff..713731c3e 100644
--- a/src/common/session-descriptor.c
+++ b/src/common/session-descriptor.c
@@ -550,14 +550,8 @@  lttng_session_descriptor_live_create(
 	struct lttng_session_descriptor_live *descriptor;
 
 	descriptor = _lttng_session_descriptor_live_create(name, live_timer_us);
-	if (!descriptor) {
-		goto error;
-	}
 
 	return descriptor ? &descriptor->base : NULL;
-error:
-	lttng_session_descriptor_destroy(descriptor ? &descriptor->base : NULL);
-	return NULL;
 }
 
 struct lttng_session_descriptor *