projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Warning fix: uninitialized variable may be used
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
cmd.c
diff --git
a/src/bin/lttng-sessiond/cmd.c
b/src/bin/lttng-sessiond/cmd.c
index aa030d3b1253f45a716cfa2386c8282c2173611a..1739aa736f41737dfcd56c183ccca434f890f75f 100644
(file)
--- a/
src/bin/lttng-sessiond/cmd.c
+++ b/
src/bin/lttng-sessiond/cmd.c
@@
-187,7
+187,14
@@
static int get_ust_runtime_stats(struct ltt_session *session,
int ret;
struct ltt_ust_session *usess;
int ret;
struct ltt_ust_session *usess;
+ if (!discarded_events || !lost_packets) {
+ ret = -1;
+ goto end;
+ }
+
usess = session->ust_session;
usess = session->ust_session;
+ assert(discarded_events);
+ assert(lost_packets);
if (!usess || !session->has_been_started) {
*discarded_events = 0;
if (!usess || !session->has_been_started) {
*discarded_events = 0;
@@
-268,7
+275,7
@@
static void list_lttng_channels(enum lttng_domain_type domain,
rcu_read_lock();
cds_lfht_for_each_entry(session->ust_session->domain_global.channels->ht,
&iter.iter, uchan, node.node) {
rcu_read_lock();
cds_lfht_for_each_entry(session->ust_session->domain_global.channels->ht,
&iter.iter, uchan, node.node) {
- uint64_t discarded_events
, lost_packets
;
+ uint64_t discarded_events
= 0, lost_packets = 0
;
strncpy(channels[i].name, uchan->name, LTTNG_SYMBOL_NAME_LEN);
channels[i].attr.overwrite = uchan->attr.overwrite;
strncpy(channels[i].name, uchan->name, LTTNG_SYMBOL_NAME_LEN);
channels[i].attr.overwrite = uchan->attr.overwrite;
This page took
0.025479 seconds
and
5
git commands to generate.