From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mn5gV-0008Ta-Or for qemu-devel@nongnu.org; Mon, 14 Sep 2009 03:09:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mn5gQ-0008TO-BP for qemu-devel@nongnu.org; Mon, 14 Sep 2009 03:09:10 -0400 Received: from [199.232.76.173] (port=55244 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mn5gQ-0008TL-6l for qemu-devel@nongnu.org; Mon, 14 Sep 2009 03:09:06 -0400 Received: from mx20.gnu.org ([199.232.41.8]:29447) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mn5gP-0006RY-M4 for qemu-devel@nongnu.org; Mon, 14 Sep 2009 03:09:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mn5gO-0000wg-S9 for qemu-devel@nongnu.org; Mon, 14 Sep 2009 03:09:05 -0400 Message-ID: <4AADEC0C.6030906@redhat.com> Date: Mon, 14 Sep 2009 09:09:00 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1252672351-12937-1-git-send-email-kraxel@redhat.com> <1252672351-12937-6-git-send-email-kraxel@redhat.com> <4AAA5AFD.1020509@redhat.com> <4AAA6591.4030904@redhat.com> <4AAAA214.4030204@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 5/8] ide/pci: convert to qdev. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org Hi, >> Sure, you have to dereference the pointer. I still don't see a >> problem here. You seem to think this is fragile. Why do you think >> so? > > Pointer not initialized, it is NULL, point nowhere, etc, etc. > No pointer, you don't need to even think about all that kind of porblems/checks. NULL can easily be checked for, and that should also catch the "not initialized" case. Pointing into nowhere is a clear bug which needs fixing anyway. > uint8_t *foo[4] > is a different beast ... how do you declare a pointer to one array of 4 > uint8_t? This isn't a pointer to an array, it is a array of pointers ... cheers, Gerd