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/computer.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'modules/computer.c') diff --git a/modules/computer.c b/modules/computer.c index 49a1511f..925822a9 100644 --- a/modules/computer.c +++ b/modules/computer.c @@ -1069,17 +1069,16 @@ void hi_module_init(void) init_memory_labels(); } -ModuleAbout *hi_module_get_about(void) +const ModuleAbout *hi_module_get_about(void) { - static ModuleAbout ma[] = { - { - .author = "Leandro A. F. Pereira", - .description = N_("Gathers high-level computer information"), - .version = VERSION, - .license = "GNU GPL version 2"} + static const ModuleAbout ma = { + .author = "Leandro A. F. Pereira", + .description = N_("Gathers high-level computer information"), + .version = VERSION, + .license = "GNU GPL version 2", }; - return ma; + return &ma; } static const gchar *hinote_kmod() { -- cgit v1.2.3