From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjnSs-0004tX-Pi for qemu-devel@nongnu.org; Mon, 12 May 2014 06:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjnSS-00033T-3M for qemu-devel@nongnu.org; Mon, 12 May 2014 06:28:10 -0400 From: Juan Quintela In-Reply-To: <536E20CC.4030401@gmail.com> (Chen Gang's message of "Sat, 10 May 2014 20:51:24 +0800") References: <536E20CC.4030401@gmail.com> Date: Mon, 12 May 2014 12:27:38 +0200 Message-ID: <87ha4v8f6t.fsf@elfo.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] arch_init: Simplify code for load_xbzrle() Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chen Gang Cc: mst@redhat.com, QEMU Trivial , mjt@tls.msk.ru, QEMU Developers , owasserm@redhat.com, pbonzini@redhat.com Chen Gang wrote: > For xbzrle_decode_buffer(), when decoding contents will exceed writing > buffer, it will return -1, so need not check the return value whether > large than writing buffer. > > And when failure occurs within load_xbzrle(), it always return -1 > without any resources which need release. > > So can remove the related checking statements, and also can remove 'rc' > and 'ret' local variables, > > > Signed-off-by: Chen Gang Reviewed-by: Juan Quintela