Fix: uninitialized return value
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 23 Jan 2015 16:28:59 +0000 (11:28 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 26 Jan 2015 15:39:55 +0000 (10:39 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c

index eab8f90d1a10bed3b9202d35bc459ffeb0386965..6b3f48579835a54da0d1a34098ff6d0e3990467d 100644 (file)
@@ -4027,7 +4027,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");
 
@@ -4068,7 +4068,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:
@@ -4087,6 +4086,7 @@ int ust_app_flush_session(struct ltt_ust_session *usess)
                break;
        }
        default:
+               ret = -1;
                assert(0);
                break;
        }
This page took 0.029756 seconds and 4 git commands to generate.