* [Qemu-devel] [6517] Properly initialize len argument of sysctl and include stdio.h ( perror)
@ 2009-02-04 20:39 malc
0 siblings, 0 replies; only message in thread
From: malc @ 2009-02-04 20:39 UTC (permalink / raw)
To: qemu-devel
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 {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-04 20:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-04 20:39 [Qemu-devel] [6517] Properly initialize len argument of sysctl and include stdio.h ( perror) malc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).