From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjSqO-00071u-IY for qemu-devel@nongnu.org; Wed, 29 Oct 2014 08:59:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjSqJ-0000ZV-OS for qemu-devel@nongnu.org; Wed, 29 Oct 2014 08:59:20 -0400 Date: Wed, 29 Oct 2014 18:29:04 +0530 From: Amit Shah Message-ID: <20141029125904.GC19598@grmbl.mre> References: <1414586983-10816-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1414586983-10816-1-git-send-email-arei.gonglei@huawei.com> Subject: Re: [Qemu-devel] [PATCH] vl.c: Fix Coverity complaining for vmstate_dump_file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com Cc: qemu-trivial@nongnu.org, weidong.huang@huawei.com, qemu-devel@nongnu.org, quintela@redhat.com On (Wed) 29 Oct 2014 [20:49:43], arei.gonglei@huawei.com wrote: > From: Gonglei > > commit abfd9ce3(migration: dump vmstate info as a json > file for static analysis) introduce a new command, > '-dump-vmstate', that takes a filename > as an argument. When executed, QEMU will dump the vmstate information > for the machine type it's invoked with to the file, and quit. > > Apparently, it supports one '-dump-vmstate' option, > otherwise, the vmstate_dump_file will be overwritten. Suggested re-wording of this para: However, only one instance of the -dump-vmstate option is supported. If more were given, the vmstate_dump_file could be overwritten. > Of course, the resource will be freed when Qemu quit, but The code logic > is not good, it will make Coverity complaining. Suggested re-wording: This fix also helps silence a Coverity error. > Signed-off-by: Gonglei Reviewed-by: Amit Shah Thanks, Amit