aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/arch/common
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2006-10-16 17:53:16 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2006-10-16 17:53:16 +0000
commite46568349c49cadc870f5c0fc84dcce2f7c461b1 (patch)
tree139332ea64b814967711035cf388438a2c9fa302 /hardinfo2/arch/common
parent3722c94e232b39d2a05ef359a60d25ac0cbe7887 (diff)
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)
Diffstat (limited to 'hardinfo2/arch/common')
-rw-r--r--hardinfo2/arch/common/blowfish.h4
-rw-r--r--hardinfo2/arch/common/md5.h3
-rw-r--r--hardinfo2/arch/common/printers.h3
-rw-r--r--hardinfo2/arch/common/sha1.h4
-rw-r--r--hardinfo2/arch/common/zlib.h4
5 files changed, 5 insertions, 13 deletions
diff --git a/hardinfo2/arch/common/blowfish.h b/hardinfo2/arch/common/blowfish.h
index d4671e45..3a237baf 100644
--- a/hardinfo2/arch/common/blowfish.h
+++ b/hardinfo2/arch/common/blowfish.h
@@ -36,9 +36,7 @@ benchmark_fish(void)
gchar *bdata_path;
- bdata_path = g_strdup_printf("%s/hardinfo/benchmark.data",
- path_data);
-
+ bdata_path = g_build_filename(path_data, "benchmark.data", NULL);
if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
g_free(bdata_path);
return g_strdup("[Error]\n"
diff --git a/hardinfo2/arch/common/md5.h b/hardinfo2/arch/common/md5.h
index 41a65e97..b539b2c7 100644
--- a/hardinfo2/arch/common/md5.h
+++ b/hardinfo2/arch/common/md5.h
@@ -33,8 +33,7 @@ benchmark_md5(void)
gchar *bdata_path;
- bdata_path = g_strdup_printf("%s/hardinfo/benchmark.data",
- path_data);
+ bdata_path = g_build_filename(path_data, "benchmark.data", NULL);
if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
g_free(bdata_path);
return g_strdup("[Error]\n"
diff --git a/hardinfo2/arch/common/printers.h b/hardinfo2/arch/common/printers.h
index 59d49dfa..3bb98f4c 100644
--- a/hardinfo2/arch/common/printers.h
+++ b/hardinfo2/arch/common/printers.h
@@ -71,8 +71,7 @@ scan_printers(void)
printer_list = g_strdup_printf("[Printers (CUPS)]\n");
for (i = 0; i < noprinters; i++) {
printer_list = g_strconcat(printer_list, printers[i],
- !strcmp(default_printer,
- printers[i]) ?
+ g_str_equal(default_printer, printers[i]) ?
"=<i>(Default)</i>\n" : "=\n",
NULL);
g_free(printers[i]);
diff --git a/hardinfo2/arch/common/sha1.h b/hardinfo2/arch/common/sha1.h
index 53616bfc..cbf8e2a3 100644
--- a/hardinfo2/arch/common/sha1.h
+++ b/hardinfo2/arch/common/sha1.h
@@ -32,9 +32,7 @@ benchmark_sha1(void)
gchar *bdata_path;
- bdata_path = g_strdup_printf("%s/hardinfo/benchmark.data",
- path_data);
-
+ bdata_path = g_build_filename(path_data, "benchmark.data", NULL);
if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
g_free(bdata_path);
return g_strdup("[Error]\n"
diff --git a/hardinfo2/arch/common/zlib.h b/hardinfo2/arch/common/zlib.h
index 0b83a6a7..3fb7fd17 100644
--- a/hardinfo2/arch/common/zlib.h
+++ b/hardinfo2/arch/common/zlib.h
@@ -53,9 +53,7 @@ benchmark_zlib(void)
glong srclen = 65536;
gchar *bdata_path;
- bdata_path = g_strdup_printf("%s/hardinfo/benchmark.data",
- path_data);
-
+ bdata_path = g_build_filename(path_data, "benchmark.data", NULL);
if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) {
g_free(bdata_path);
return g_strdup("[Error]\n"