summaryrefslogtreecommitdiff
path: root/modules/computer.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-17 00:25:42 -0500
committerLeandro Pereira <leandro@hardinfo.org>2017-07-19 07:20:40 -0700
commitf66f6e6e74a52ae43a000329ba9c3a0b51ebe26f (patch)
treec23d6e1a15b282ad5753cfa56a8cfe9f696ba0af /modules/computer.c
parent9466b122953aa518c1ef262afb83565e9b1c2f35 (diff)
computer.c: minor cosmetic fixes in hi_get_field()
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/computer.c')
-rw-r--r--modules/computer.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/computer.c b/modules/computer.c
index c77c2349..298a2364 100644
--- a/modules/computer.c
+++ b/modules/computer.c
@@ -99,22 +99,22 @@ gchar *hi_get_field(gchar * field)
gchar *tmp;
if (g_str_equal(field, _("Memory"))) {
- MemoryInfo *mi = computer_get_memory();
- tmp = g_strdup_printf(_("%dMB (%dMB used)"), mi->total, mi->used);
- g_free(mi);
+ MemoryInfo *mi = computer_get_memory();
+ tmp = g_strdup_printf(_("%dMB (%dMB used)"), mi->total, mi->used);
+ g_free(mi);
} else if (g_str_equal(field, _("Uptime"))) {
- tmp = computer_get_formatted_uptime();
+ tmp = computer_get_formatted_uptime();
} else if (g_str_equal(field, _("Date/Time"))) {
- time_t t = time(NULL);
+ time_t t = time(NULL);
- tmp = g_new0(gchar, 64);
- strftime(tmp, 64, "%c", localtime(&t));
+ tmp = g_new0(gchar, 64);
+ strftime(tmp, 64, "%c", localtime(&t));
} else if (g_str_equal(field, _("Load Average"))) {
- tmp = computer_get_formatted_loadavg();
+ tmp = computer_get_formatted_loadavg();
} else if (g_str_equal(field, _("Available entropy in /dev/random"))) {
- tmp = computer_get_entropy_avail();
+ tmp = computer_get_entropy_avail();
} else {
- tmp = g_strdup_printf("Unknown field: %s", field);
+ tmp = g_strdup_printf("Unknown field: %s", field);
}
return tmp;
}