From 732eff53f0510108732b26cffdac60a99905b4c5 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Sun, 3 May 2020 10:46:10 -0700 Subject: hi_module_get_about() should return a const pointer --- modules/benchmark.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'modules/benchmark.c') diff --git a/modules/benchmark.c b/modules/benchmark.c index 068b466c..0d337ec1 100644 --- a/modules/benchmark.c +++ b/modules/benchmark.c @@ -649,15 +649,16 @@ guchar hi_module_get_weight(void) { return 240; } ModuleEntry *hi_module_get_entries(void) { return entries; } -ModuleAbout *hi_module_get_about(void) +const ModuleAbout *hi_module_get_about(void) { - static ModuleAbout ma[] = { - {.author = "Leandro A. F. Pereira", - .description = N_("Perform tasks and compare with other systems"), - .version = VERSION, - .license = "GNU GPL version 2"}}; - - return ma; + static const ModuleAbout ma = { + .author = "Leandro A. F. Pereira", + .description = N_("Perform tasks and compare with other systems"), + .version = VERSION, + .license = "GNU GPL version 2", + }; + + return &ma; } static gchar *get_benchmark_results() -- cgit v1.2.3