diff options
author | Andrew Price <anprice@redhat.com> | 2014-04-26 03:49:22 +0100 |
---|---|---|
committer | Andrew Price <anprice@redhat.com> | 2014-04-26 03:49:22 +0100 |
commit | 04c78bb7014df9421357ccaffc41063944617a9b (patch) | |
tree | 75fc3a82907e98a4783b435de729c6aeb1e173d3 | |
parent | 5436d38d6d834b747f72666bec3013781811d6d6 (diff) | |
download | iowatcher-04c78bb7014df9421357ccaffc41063944617a9b.tar.gz |
Correct a couple of calloc calls
(Caught by Coverity.) tf->gdd_writes and tf->gdd_reads are arrays of
pointers so update their allocations to use the correct element size.
Signed-off-by: Andrew Price <anprice@redhat.com>
-rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -287,8 +287,8 @@ static void setup_trace_file_graphs(void) tf->queue_depth_gld = alloc_line_data(tf->min_seconds, tf->max_seconds, tf->stop_seconds); tf->iop_gld = alloc_line_data(tf->min_seconds, tf->max_seconds, tf->stop_seconds); - tf->gdd_writes = calloc(alloc_ptrs, sizeof(struct graph_dot_data)); - tf->gdd_reads = calloc(alloc_ptrs, sizeof(struct graph_dot_data)); + tf->gdd_writes = calloc(alloc_ptrs, sizeof(struct graph_dot_data *)); + tf->gdd_reads = calloc(alloc_ptrs, sizeof(struct graph_dot_data *)); tf->io_plots_allocated = alloc_ptrs; if (tf->trace->mpstat_num_cpus == 0) |