From: Mathieu Desnoyers Date: Fri, 23 Jan 2015 16:28:59 +0000 (-0500) Subject: Fix: uninitialized return value X-Git-Tag: v2.5.4~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7a391832ea3d70a71e00b76398259c5aa7d18541;p=lttng-tools.git Fix: uninitialized return value Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index fa8dc5fef..8f0b7faf7 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -4093,7 +4093,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"); @@ -4134,7 +4134,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: @@ -4153,6 +4152,7 @@ int ust_app_flush_session(struct ltt_ust_session *usess) break; } default: + ret = -1; assert(0); break; }