From e46568349c49cadc870f5c0fc84dcce2f7c461b1 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Mon, 16 Oct 2006 17:53:16 +0000 Subject: Use g_str_equal instead of strcmp. About box cleanups Use g_build_filename instead of building paths on my own Better BinReloc support (should work even if binreloc initialization fails) --- hardinfo2/computer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hardinfo2/computer.c') diff --git a/hardinfo2/computer.c b/hardinfo2/computer.c index ee430d77..43c57644 100644 --- a/hardinfo2/computer.c +++ b/hardinfo2/computer.c @@ -166,21 +166,21 @@ hi_get_field(gchar * field) { gchar *tmp; - if (!strcmp(field, "Memory")) { + if (g_str_equal(field, "Memory")) { MemoryInfo *mi; mi = computer_get_memory(); tmp = g_strdup_printf("%dMB (%dMB used)", mi->total, mi->used); g_free(mi); - } else if (!strcmp(field, "Uptime")) { + } else if (g_str_equal(field, "Uptime")) { tmp = computer_get_formatted_uptime(); - } else if (!strcmp(field, "Date/Time")) { + } else if (g_str_equal(field, "Date/Time")) { time_t t = time(NULL); tmp = g_new0(gchar, 32); strftime(tmp, 32, "%D / %R", localtime(&t)); - } else if (!strcmp(field, "Load Average")) { + } else if (g_str_equal(field, "Load Average")) { tmp = computer_get_formatted_loadavg(); } else { tmp = g_strdup(""); -- cgit v1.2.3