projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fd-tracker: remove use of VLA for unsuspendable_fd APIs
[lttng-tools.git]
/
src
/
common
/
utils.c
diff --git
a/src/common/utils.c
b/src/common/utils.c
index f3cb9e0306e599a3b7aef48bce1812cfc7d6a03a..d79985a16ce601ba419b57b41374b018b062b48e 100644
(file)
--- a/
src/common/utils.c
+++ b/
src/common/utils.c
@@
-744,7
+744,8
@@
int utils_stream_file_path(const char *path_name, const char *file_name,
char count_str[MAX_INT_DEC_LEN(count) + 1] = {};
const char *path_separator;
char count_str[MAX_INT_DEC_LEN(count) + 1] = {};
const char *path_separator;
- if (path_name && path_name[strlen(path_name) - 1] == '/') {
+ if (path_name && (path_name[0] == '\0' ||
+ path_name[strlen(path_name) - 1] == '/')) {
path_separator = "";
} else {
path_separator = "/";
path_separator = "";
} else {
path_separator = "/";
This page took
0.02406 seconds
and
4
git commands to generate.