summaryrefslogtreecommitdiffstats
path: root/wsutil/cpu_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'wsutil/cpu_info.c')
-rw-r--r--wsutil/cpu_info.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wsutil/cpu_info.c b/wsutil/cpu_info.c
index f9e6aa25..7c31a3bd 100644
--- a/wsutil/cpu_info.c
+++ b/wsutil/cpu_info.c
@@ -36,7 +36,7 @@
* model strings.
*/
static int
-compare_model_names(gconstpointer a, gconstpointer b, void * user_data _U_)
+compare_model_names(const void *a, const void *b, void * user_data _U_)
{
return strcmp((const char *)a, (const char *)b);
}
@@ -201,7 +201,7 @@ get_cpu_info(GString *str)
/*
* Allocate a buffer for the subkey.
*/
- subkey_buf = (wchar_t *)g_malloc(max_subkey_len * sizeof (wchar_t));
+ subkey_buf = g_new(wchar_t, max_subkey_len);
if (subkey_buf == NULL) {
/* Just give up. */
g_tree_destroy(model_names);
@@ -383,6 +383,7 @@ get_cpu_info(GString *str)
*/
uint32_t CPUInfo[4];
char CPUBrandString[0x40];
+ char *model_name;
unsigned nExIds;
/*