From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8niU-0005u4-Hd for qemu-devel@nongnu.org; Tue, 04 Sep 2012 03:38:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8niO-0004UM-UJ for qemu-devel@nongnu.org; Tue, 04 Sep 2012 03:38:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8niO-0004UB-Lq for qemu-devel@nongnu.org; Tue, 04 Sep 2012 03:38:28 -0400 Message-ID: <5045AFED.2030303@redhat.com> Date: Tue, 04 Sep 2012 09:38:21 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1346663926-20188-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1346663926-20188-3-git-send-email-xiawenc@linux.vnet.ibm.com> <5045AB77.1010602@linux.vnet.ibm.com> In-Reply-To: <5045AB77.1010602@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/6] libqblock public type defines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, Blue Swirl , eblake@redhat.com Il 04/09/2012 09:19, Wenchao Xia ha scritto: >>> >>> +struct QBlockOption_prot_file { >> >> QBlockOptionProtFile >> >>> + char *filename; >> >> 'const' >> > There is a problem, this member would be used in information > retrieving, so it will be set to a pointer to a string allocated > at runtime, and later be freed. I am not sure if const fits for this > situation, let me check. No, const would add useless complication. In C++ it is different because you have constructors. Paolo