projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: remove NULL check on sesison_create mandatory arguments
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
session.c
diff --git
a/src/bin/lttng-relayd/session.c
b/src/bin/lttng-relayd/session.c
index 827746430712e098d028f8a8105ab881cdf336ed..2f65848a9cedc2ed18bd56a630541b6922db8905 100644
(file)
--- a/
src/bin/lttng-relayd/session.c
+++ b/
src/bin/lttng-relayd/session.c
@@
-181,17
+181,21
@@
struct relay_session *session_create(const char *session_name,
int ret;
struct relay_session *session = NULL;
int ret;
struct relay_session *session = NULL;
- if (session_name && strstr(session_name, ".")) {
+ assert(session_name);
+ assert(hostname);
+ assert(base_path);
+
+ if (strstr(session_name, ".")) {
ERR("Illegal character in session name: \"%s\"",
session_name);
goto error;
}
ERR("Illegal character in session name: \"%s\"",
session_name);
goto error;
}
- if (
base_path &&
strstr(base_path, "../")) {
+ if (strstr(base_path, "../")) {
ERR("Invalid session base path walks up the path hierarchy: \"%s\"",
base_path);
goto error;
}
ERR("Invalid session base path walks up the path hierarchy: \"%s\"",
base_path);
goto error;
}
- if (
hostname &&
strstr(hostname, ".")) {
+ if (strstr(hostname, ".")) {
ERR("Invalid character in hostname: \"%s\"",
hostname);
goto error;
ERR("Invalid character in hostname: \"%s\"",
hostname);
goto error;
This page took
0.033708 seconds
and
4
git commands to generate.