diff options
Diffstat (limited to 'hardinfo2/arch')
| -rw-r--r-- | hardinfo2/arch/common/blowfish.h | 4 | ||||
| -rw-r--r-- | hardinfo2/arch/common/md5.h | 3 | ||||
| -rw-r--r-- | hardinfo2/arch/common/printers.h | 3 | ||||
| -rw-r--r-- | hardinfo2/arch/common/sha1.h | 4 | ||||
| -rw-r--r-- | hardinfo2/arch/common/zlib.h | 4 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/modules.h | 2 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/storage.h | 2 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/x86/processor.h | 2 | 
8 files changed, 8 insertions, 16 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" diff --git a/hardinfo2/arch/linux/common/modules.h b/hardinfo2/arch/linux/common/modules.h index 69f7ebd6..9c335f18 100644 --- a/hardinfo2/arch/linux/common/modules.h +++ b/hardinfo2/arch/linux/common/modules.h @@ -72,7 +72,7 @@ scan_modules(void)  	/* old modutils displays <none> when there's no value for a  	   given field; this is not desirable in the module name   	   display, so change it to an empty string */ -	if (description && !strcmp(description, "<none>")) { +	if (description && g_str_equal(description, "<none>")) {  	    g_free(description);  	    description = g_strdup("");  	} diff --git a/hardinfo2/arch/linux/common/storage.h b/hardinfo2/arch/linux/common/storage.h index 7321f70e..3f65b04e 100644 --- a/hardinfo2/arch/linux/common/storage.h +++ b/hardinfo2/arch/linux/common/storage.h @@ -107,7 +107,7 @@ scan_scsi(void)                  int i;                  for (i = 0; type2icon[i].type != NULL; i++) -                    if (!strcmp(buf + 8, type2icon[i].type)) +                    if (g_str_equal(buf + 8, type2icon[i].type))                          break;                  type = type2icon[i].label; diff --git a/hardinfo2/arch/linux/x86/processor.h b/hardinfo2/arch/linux/x86/processor.h index f13c9dcc..1897a3e7 100644 --- a/hardinfo2/arch/linux/x86/processor.h +++ b/hardinfo2/arch/linux/x86/processor.h @@ -246,7 +246,7 @@ processor_get_capabilities_from_flags(gchar * strflags)      while (flags[j]) {  	gchar *meaning = "";  	for (i = 0; flag_meaning[i].name != NULL; i++) { -	    if (!strcmp(flags[j], flag_meaning[i].name)) { +	    if (g_str_equal(flags[j], flag_meaning[i].name)) {  		meaning = flag_meaning[i].meaning;  		break;  	    } | 
