projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cppcheck: Simplify empty string test without using strlen()
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
trace-ust.c
diff --git
a/src/bin/lttng-sessiond/trace-ust.c
b/src/bin/lttng-sessiond/trace-ust.c
index e07d27e678b93c718ff3dee1378706b3382a3692..5e06a845242b79293d78add5d8f30d4e2bc81579 100644
(file)
--- a/
src/bin/lttng-sessiond/trace-ust.c
+++ b/
src/bin/lttng-sessiond/trace-ust.c
@@
-216,7
+216,7
@@
struct ltt_ust_session *trace_ust_create_session(char *path,
lus->tmp_consumer = NULL;
/* Use the default consumer output which is the tracing session path. */
lus->tmp_consumer = NULL;
/* Use the default consumer output which is the tracing session path. */
- if (
path && strlen(path) > 0
) {
+ if (
*path != '\0'
) {
int ret;
ret = snprintf(lus->consumer->dst.trace_path, PATH_MAX,
int ret;
ret = snprintf(lus->consumer->dst.trace_path, PATH_MAX,
@@
-418,7
+418,7
@@
struct ltt_ust_metadata *trace_ust_create_metadata(char *path)
lum->handle = -1;
/* Set metadata trace path */
lum->handle = -1;
/* Set metadata trace path */
- ret = snprintf(lum->pathname, PATH_MAX, "%s/
metadata"
, path);
+ ret = snprintf(lum->pathname, PATH_MAX, "%s/
" DEFAULT_METADATA_NAME
, path);
if (ret < 0) {
PERROR("asprintf ust metadata");
goto error_free_metadata;
if (ret < 0) {
PERROR("asprintf ust metadata");
goto error_free_metadata;
This page took
0.028566 seconds
and
5
git commands to generate.