Fix: Coverity warning CWE-457: Use of Uninitialized Variable
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 20 Feb 2014 06:12:01 +0000 (01:12 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 20 Feb 2014 06:12:01 +0000 (01:12 -0500)
ret is uninitialized if no streams are declared in the trace
descriptor.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/iterator.c

index 5e8a8ce8bee097059ff1c1d8d92e0f55ab611717..74942ac8948e19d9abbcc4910cd6685d9a9a9e48 100644 (file)
@@ -663,7 +663,7 @@ int bt_iter_add_trace(struct bt_iter *iter,
                struct bt_trace_descriptor *td_read)
 {
        struct ctf_trace *tin;
-       int stream_id, ret;
+       int stream_id, ret = 0;
 
        tin = container_of(td_read, struct ctf_trace, parent);
 
This page took 0.033062 seconds and 4 git commands to generate.