diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2020-05-03 10:51:38 -0700 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2020-05-03 14:08:12 -0700 |
commit | 707b2484dadded505f766be4593d127ea16a2892 (patch) | |
tree | 58ad0a8ce03d5f631fe9006670fd86878be1ef4d /modules/computer.c | |
parent | cedaec6c9e6611bec090247df09f6138c19d2fc5 (diff) |
hi_exported_methods() should return a const pointer
Diffstat (limited to 'modules/computer.c')
-rw-r--r-- | modules/computer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/computer.c b/modules/computer.c index 925822a9..0346e3e2 100644 --- a/modules/computer.c +++ b/modules/computer.c @@ -953,9 +953,9 @@ const gchar *get_memory_desc(void) // [1] const (as to say "don't free") return (gchar*)idle_free(avail); // [1] idle_free() } -ShellModuleMethod *hi_exported_methods(void) +const ShellModuleMethod *hi_exported_methods(void) { - static ShellModuleMethod m[] = { + static const ShellModuleMethod m[] = { {"getOSKernel", get_os_kernel}, {"getOS", get_os}, {"getDisplaySummary", get_display_summary}, @@ -964,7 +964,7 @@ ShellModuleMethod *hi_exported_methods(void) {"getKernelModuleDescription", get_kernel_module_description}, {"getMemoryTotal", get_memory_total}, {"getMemoryDesc", get_memory_desc}, - {NULL} + {NULL}, }; return m; |