From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUoWh-0004Hk-Nw for qemu-devel@nongnu.org; Wed, 04 Feb 2009 15:39:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUoWf-0004Gy-DL for qemu-devel@nongnu.org; Wed, 04 Feb 2009 15:39:14 -0500 Received: from [199.232.76.173] (port=37407 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUoWf-0004Gv-93 for qemu-devel@nongnu.org; Wed, 04 Feb 2009 15:39:13 -0500 Received: from savannah.gnu.org ([199.232.41.3]:56705 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUoWf-00062x-1r for qemu-devel@nongnu.org; Wed, 04 Feb 2009 15:39:13 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LUoWc-0005Ju-ID for qemu-devel@nongnu.org; Wed, 04 Feb 2009 20:39:10 +0000 Received: from malc by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LUoWc-0005Jq-6Y for qemu-devel@nongnu.org; Wed, 04 Feb 2009 20:39:10 +0000 MIME-Version: 1.0 Errors-To: malc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: malc Message-Id: Date: Wed, 04 Feb 2009 20:39:10 +0000 Subject: [Qemu-devel] [6517] Properly initialize len argument of sysctl and include stdio.h ( perror) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 #include #include @@ -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 {