[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [6517] Properly initialize len argument of sysctl and inclu
From: |
malc |
Subject: |
[Qemu-devel] [6517] Properly initialize len argument of sysctl and include stdio.h ( perror) |
Date: |
Wed, 04 Feb 2009 20:39:10 +0000 |
Revision: 6517
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6517
Author: malc
Date: 2009-02-04 20:39:09 +0000 (Wed, 04 Feb 2009)
Log Message:
-----------
Properly initialize len argument of sysctl and include stdio.h (perror)
Modified Paths:
--------------
trunk/cache-utils.c
Modified: trunk/cache-utils.c
===================================================================
--- trunk/cache-utils.c 2009-02-04 14:08:08 UTC (rev 6516)
+++ trunk/cache-utils.c 2009-02-04 20:39:09 UTC (rev 6517)
@@ -37,6 +37,7 @@
}
#elif defined __APPLE__
+#include <stdio.h>
#include <sys/types.h>
#include <sys/sysctl.h>
@@ -46,6 +47,7 @@
unsigned cacheline;
int name[2] = { CTL_HW, HW_CACHELINE };
+ len = sizeof(cacheline);
if (sysctl(name, 2, &cacheline, &len, NULL, 0)) {
perror("sysctl CTL_HW HW_CACHELINE failed");
} else {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [6517] Properly initialize len argument of sysctl and include stdio.h ( perror),
malc <=