From 2789816d7cecbe47056afad979fac462d4b32833 Mon Sep 17 00:00:00 2001 From: Gerardo Orellana Date: Thu, 20 Sep 2018 20:00:54 -0500 Subject: [PATCH] Ensure add_data_to_holder() function is defined prior to where is being called. --- src/gholder.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/gholder.c b/src/gholder.c index fe5273f0d7..9f3ed528a6 100644 --- a/src/gholder.c +++ b/src/gholder.c @@ -495,6 +495,25 @@ set_host (GRawDataItem item, GHolder * h, const GPanel * panel, char *data, h->idx++; } +/* Set all panel data. This will set data for panels that do not + * contain sub items. A function pointer is used for post data set. */ +static void +add_data_to_holder (GRawDataItem item, GHolder * h, GRawDataType type, + const GPanel * panel) +{ + char *data = NULL; + int hits = 0; + + if (set_data_hits_keys (h->module, item, type, &data, &hits) == 1) + return; + + set_data_holder_metrics (item, h, data, hits); + if (panel->holder_callback) + panel->holder_callback (h); + + h->idx++; +} + /* Set all panel data. This will set data for panels that do not * contain sub items. A function pointer is used for post data set. */ static void @@ -546,25 +565,6 @@ add_host_to_holder (GRawDataItem item, GHolder * h, GRawDataType type, } } -/* Set all panel data. This will set data for panels that do not - * contain sub items. A function pointer is used for post data set. */ -static void -add_data_to_holder (GRawDataItem item, GHolder * h, GRawDataType type, - const GPanel * panel) -{ - char *data = NULL; - int hits = 0; - - if (set_data_hits_keys (h->module, item, type, &data, &hits) == 1) - return; - - set_data_holder_metrics (item, h, data, hits); - if (panel->holder_callback) - panel->holder_callback (h); - - h->idx++; -} - /* Set all root panel data. This will set the root nodes. */ static int set_root_metrics (GRawDataItem item, GRawDataType type, GModule module,