diff options
author | Andrew Price <anprice@redhat.com> | 2014-04-26 03:49:22 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-24 12:02:09 -0700 |
commit | 7f64c1928f85235e01e6f268fdc4cbfc921b5c42 (patch) | |
tree | 1093c73ed92fb06345dce7cb4789e3f27576814b | |
parent | c9e749da1b973efddc75ca4d66b9c662ab81b42b (diff) | |
download | blktrace-7f64c1928f85235e01e6f268fdc4cbfc921b5c42.tar.gz |
iowatcher: 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-- | iowatcher/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/iowatcher/main.c b/iowatcher/main.c index 92b0ef3..ebbcf3d 100644 --- a/iowatcher/main.c +++ b/iowatcher/main.c @@ -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) |