From 17b1ec2758380019edfb3b114b67025c5a17edee Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 23 Jan 2015 11:28:59 -0500 Subject: [PATCH] Fix: uninitialized return value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/ust-app.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 836f0824a..12df8391c 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -4113,7 +4113,7 @@ static int ust_app_flush_session(struct ltt_ust_session *usess) { - int ret; + int ret = 0; DBG("Flushing session buffers for all ust apps"); @@ -4154,7 +4154,6 @@ int ust_app_flush_session(struct ltt_ust_session *usess) /* Push metadata. */ (void) push_metadata(ust_session_reg, usess->consumer); } - ret = 0; break; } case LTTNG_BUFFER_PER_PID: @@ -4173,6 +4172,7 @@ int ust_app_flush_session(struct ltt_ust_session *usess) break; } default: + ret = -1; assert(0); break; } -- 2.34.1