summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d25c0e)
raw | patch | inline | side by side (parent: 4d25c0e)
author | octo <octo> | |
Wed, 5 Apr 2006 10:59:21 +0000 (10:59 +0000) | ||
committer | octo <octo> | |
Wed, 5 Apr 2006 10:59:21 +0000 (10:59 +0000) |
Removed unneccesary and possibly confusing pointer.
src/cpu.c | patch | blob | history |
diff --git a/src/cpu.c b/src/cpu.c
index 74faf09a93fe9d946771dbe063dcc741e77173c6..ad0816d86c889ba9c1c6fd9463cc0c277e08b7a0 100644 (file)
--- a/src/cpu.c
+++ b/src/cpu.c
port_host = mach_host_self ();
+ /* FIXME: Free `cpu_list' if it's not NULL */
if ((status = host_processors (port_host, &cpu_list, &cpu_list_len)) != KERN_SUCCESS)
{
syslog (LOG_ERR, "cpu-plugin: host_processors returned %i\n", (int) status);
kern_return_t status;
processor_cpu_load_info_data_t cpu_info;
- processor_cpu_load_info_t cpu_info_ptr;
mach_msg_type_number_t cpu_info_len;
host_t cpu_host;
for (cpu = 0; cpu < cpu_list_len; cpu++)
{
cpu_host = 0;
- cpu_info_ptr = &cpu_info;
cpu_info_len = sizeof (cpu_info);
if ((status = processor_info (cpu_list[cpu],
PROCESSOR_CPU_LOAD_INFO, &cpu_host,
- (processor_info_t) cpu_info_ptr, &cpu_info_len)) != KERN_SUCCESS)
+ (processor_info_t) &cpu_info, &cpu_info_len)) != KERN_SUCCESS)
{
syslog (LOG_ERR, "processor_info failed with status %i\n", (int) status);
continue;