diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/benchmark.c | 17 | ||||
-rw-r--r-- | modules/computer.c | 15 | ||||
-rw-r--r-- | modules/devices.c | 17 | ||||
-rw-r--r-- | modules/network.c | 16 |
4 files changed, 32 insertions, 33 deletions
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() 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() { diff --git a/modules/devices.c b/modules/devices.c index a90cbc0a..fef8b559 100644 --- a/modules/devices.c +++ b/modules/devices.c @@ -867,17 +867,16 @@ void hi_module_deinit(void) g_module_close(cups); } -ModuleAbout *hi_module_get_about(void) -{ - static ModuleAbout ma[] = { - { - .author = "Leandro A. F. Pereira", - .description = N_("Gathers information about hardware devices"), - .version = VERSION, - .license = "GNU GPL version 2"} +const ModuleAbout *hi_module_get_about(void) +{ + const static ModuleAbout ma = { + .author = "Leandro A. F. Pereira", + .description = N_("Gathers information about hardware devices"), + .version = VERSION, + .license = "GNU GPL version 2", }; - return ma; + return &ma; } gchar **hi_module_get_dependencies(void) diff --git a/modules/network.c b/modules/network.c index a40db80e..300cc041 100644 --- a/modules/network.c +++ b/modules/network.c @@ -433,15 +433,15 @@ void hi_module_deinit(void) g_free(__connections); } -ModuleAbout *hi_module_get_about(void) +const ModuleAbout *hi_module_get_about(void) { - static ModuleAbout ma[] = { - { - .author = "Leandro A. F. Pereira", - .description = N_("Gathers information about this computer's network connection"), - .version = VERSION, - .license = "GNU GPL version 2"} + static const ModuleAbout ma = { + .author = "Leandro A. F. Pereira", + .description = + N_("Gathers information about this computer's network connection"), + .version = VERSION, + .license = "GNU GPL version 2", }; - return ma; + return &ma; } |