projects
/
lttngtop.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo in pid_check
[lttngtop.git]
/
src
/
iostreamtop.c
diff --git
a/src/iostreamtop.c
b/src/iostreamtop.c
index 33b901938b9356e65690694c297f403483edd84b..bda9c7ce9d8c098b86b6116ba85385e92b084c00 100644
(file)
--- a/
src/iostreamtop.c
+++ b/
src/iostreamtop.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2011 Mathieu Bain <mathieu.bain@polymtl.ca>
+ * Copyright (C) 2011
-2012
Mathieu Bain <mathieu.bain@polymtl.ca>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
@@
-31,13
+31,17
@@
void add_file(struct processtop *proc, struct files *file, int fd)
struct files *tmp_file;
struct processtop *parent;
int size;
struct files *tmp_file;
struct processtop *parent;
int size;
+ int i;
size = proc->process_files_table->len;
parent = proc->threadparent;
if (parent)
insert_file(parent, fd);
if (size <= fd) {
size = proc->process_files_table->len;
parent = proc->threadparent;
if (parent)
insert_file(parent, fd);
if (size <= fd) {
- g_ptr_array_set_size(proc->process_files_table, fd);
+ /* Add NULL file structures for undefined FDs */
+ for (i = size; i < fd; i++) {
+ g_ptr_array_add(proc->process_files_table, NULL);
+ }
g_ptr_array_add(proc->process_files_table, file);
} else {
tmp_file = g_ptr_array_index(proc->process_files_table, fd);
g_ptr_array_add(proc->process_files_table, file);
} else {
tmp_file = g_ptr_array_index(proc->process_files_table, fd);
This page took
0.023592 seconds
and
4
git commands to generate.