projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: spaghetti function return path
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
live.c
diff --git
a/src/bin/lttng-relayd/live.c
b/src/bin/lttng-relayd/live.c
index 6c3e94f273f55afeb60da5597a4293c452bdc015..428e61361cc3625df776f88f3af1979571738b6b 100644
(file)
--- a/
src/bin/lttng-relayd/live.c
+++ b/
src/bin/lttng-relayd/live.c
@@
-735,7
+735,12
@@
int viewer_connect(struct relay_connection *conn)
reply.major = htobe32(reply.major);
reply.minor = htobe32(reply.minor);
if (conn->type == RELAY_VIEWER_COMMAND) {
reply.major = htobe32(reply.major);
reply.minor = htobe32(reply.minor);
if (conn->type == RELAY_VIEWER_COMMAND) {
- reply.viewer_session_id = htobe64(++last_relay_viewer_session_id);
+ /*
+ * Increment outside of htobe64 macro, because can be used more than once
+ * within the macro, and thus the operation may be undefined.
+ */
+ last_relay_viewer_session_id++;
+ reply.viewer_session_id = htobe64(last_relay_viewer_session_id);
}
health_code_update();
}
health_code_update();
@@
-808,14
+813,9
@@
int viewer_list_sessions(struct relay_connection *conn)
}
health_code_update();
}
health_code_update();
- rcu_read_unlock();
ret = 0;
ret = 0;
- goto end;
-
end_unlock:
rcu_read_unlock();
end_unlock:
rcu_read_unlock();
-
-end:
return ret;
}
return ret;
}
This page took
0.023948 seconds
and
4
git commands to generate.