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 9af6d9d4acce64b9b9855e46ed462a624573c693..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;
@@
-216,6
+223,7
@@
static int get_ust_runtime_stats(struct ltt_session *session,
*lost_packets += uchan->per_pid_closed_app_lost;
} else {
ERR("Unsupported buffer type");
*lost_packets += uchan->per_pid_closed_app_lost;
} else {
ERR("Unsupported buffer type");
+ assert(0);
ret = -1;
goto end;
}
ret = -1;
goto end;
}
@@
-267,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.0312 seconds
and
5
git commands to generate.