X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=blobdiff_plain;f=src%2Fiostreamtop.c;h=e4da1dd408e0be30c3af2c5f825cf7f27259731e;hp=f3fef7b25ea97043dfc8f89949fb3bbf05556811;hb=58b6d0bfd897e4e62d58554f5a3704a9beaae407;hpb=38be0c3fdc487f3cc2609266a33a39b96289faba diff --git a/src/iostreamtop.c b/src/iostreamtop.c index f3fef7b..e4da1dd 100644 --- a/src/iostreamtop.c +++ b/src/iostreamtop.c @@ -103,7 +103,7 @@ void insert_file(struct processtop *proc, int fd) return; if (fd >= proc->process_files_table->len) { tmp = g_new0(struct files, 1); - tmp->name = "Unknown"; + tmp->name = NULL; tmp->read = 0; tmp->write = 0; tmp->fd = fd; @@ -113,7 +113,7 @@ void insert_file(struct processtop *proc, int fd) tmp = g_ptr_array_index(proc->process_files_table, fd); if (tmp == NULL) { tmp = g_new0(struct files, 1); - tmp->name = "Unknown"; + tmp->name = NULL; tmp->read = 0; tmp->write = 0; tmp->fd = fd; @@ -124,7 +124,7 @@ void insert_file(struct processtop *proc, int fd) if (parent) { tmp_parent = g_ptr_array_index( parent->process_files_table, fd); - if (tmp_parent && + if (tmp_parent && tmp->name && tmp_parent->name && (strcmp(tmp->name, tmp_parent->name)) != 0) tmp->name = strdup(tmp_parent->name); }