Abstract out the thread_options structure
[fio.git] / graph.c
diff --git a/graph.c b/graph.c
index 4a3a9938b008770594536f4dd9af191ba50a2e46..e9fce952e04aae94e94d8a28b6fc5cd365c686a0 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -60,13 +60,18 @@ struct graph {
        const char *font;
 };
 
+void graph_set_size(struct graph *g, unsigned int xdim, unsigned int ydim)
+{
+       g->xdim = xdim;
+       g->ydim = ydim;
+}
+
 struct graph *graph_new(unsigned int xdim, unsigned int ydim, const char *font)
 {
        struct graph *g;
 
        g = calloc(1, sizeof(*g));
-       g->xdim = xdim;
-       g->ydim = ydim;
+       graph_set_size(g, xdim, ydim);
        g->per_label_limit = -1;
        g->font = font;
        if (!g->font)