From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] xen/many: xfree() can tolerate NULL pointers Date: Mon, 19 Jan 2015 10:54:07 +0000 Message-ID: <1421664847.10440.41.camel@citrix.com> References: <1421664139-9058-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1421664139-9058-1-git-send-email-andrew.cooper3@citrix.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: Andrew Cooper Cc: Tim Deegan , Keir Fraser , Ian Jackson , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, 2015-01-19 at 10:42 +0000, Andrew Cooper wrote: > Replace instances of "if ( p ) xfree(p)" with just "xfree(p)" > > Signed-off-by: Andrew Cooper > CC: Keir Fraser > CC: Jan Beulich > CC: Tim Deegan > CC: Ian Campbell > CC: Ian Jackson > > --- > > This was from some experimentation with semantic patches. 'spatch' can't > currently parse some of our macros (e.g. XEN_GUEST_HANDLE()), which cases it > to skip large numbers of functions in the codebase How annoying! (and surprising) Anyway, could you include the spatch in the commit log, for completeness and for future cargo culting ;-) (unless it's huge, I guess) Ian.