projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: assign the current clock for mmap traces
[babeltrace.git]
/
lib
/
context.c
diff --git
a/lib/context.c
b/lib/context.c
index 373944c20c2144fd0e0d0ab20a56578f635cc641..e2c1739c41ff548a21ae13a3e62f983779590e5b 100644
(file)
--- a/
lib/context.c
+++ b/
lib/context.c
@@
-104,8
+104,10
@@
int bt_context_add_trace(struct bt_context *ctx, const char *path,
}
handle->format = fmt;
handle->td = td;
}
handle->format = fmt;
handle->td = td;
- strncpy(handle->path, path, PATH_MAX);
- handle->path[PATH_MAX - 1] = '\0';
+ if (path) {
+ strncpy(handle->path, path, PATH_MAX);
+ handle->path[PATH_MAX - 1] = '\0';
+ }
if (fmt->set_handle)
fmt->set_handle(td, handle);
if (fmt->set_handle)
fmt->set_handle(td, handle);
This page took
0.023678 seconds
and
4
git commands to generate.