From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2] remove unnecessary null pointer checks before frees Date: Thu, 3 Oct 2013 14:43:03 +0100 Message-ID: <1380807783.25618.15.camel@kazak.uk.xensource.com> References: <1380423939-15012-1-git-send-email-mattjd@gmail.com> <1380425218-15403-1-git-send-email-mattjd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1380425218-15403-1-git-send-email-mattjd@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Matthew Daley Cc: Andrew Cooper , Stefano Stabellini , xen-devel@lists.xen.org, Samuel Thibault List-Id: xen-devel@lists.xenproject.org On Sun, 2013-09-29 at 16:26 +1300, Matthew Daley wrote: > Oops, spatch removed an #if 0'd hunk from gtraceview.c. Here's a fixed version: > > -- 8< -- > > Patch generated by the following semantic patch > (http://coccinelle.lip6.fr/): > > @@ > expression *P; > @@ > > - if(P) free(P); > + free(P); > > ...and then by filtering through the following command: > > filterdiff -p1 -x 'stubdom/*' -x 'tools/firmware/*' -x 'tools/qemu-*' > > Signed-off-by: Matthew Daley > --- [...] > tools/blktap/drivers/blktapctrl.c | 6 ++---- > tools/blktap/drivers/tapaio.c | 18 ++++++---------- > tools/blktap/drivers/tapdisk.c | 9 +++----- > tools/blktap/lib/xenbus.c | 21 +++++++------------ > tools/blktap/lib/xs_api.c | 3 +-- > tools/blktap2/control/tap-ctl-list.c | 6 ++---- > tools/blktap2/drivers/block-log.c | 3 +-- I'm slightly inclined to not touch these unmaintained bits, especially blktap1 from a "if it aint' broke" type mentality and a reluctance to touch it even for such an obviously correct change. What do others think? The rest seems good. Ian.