From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuele Giaquinta Newsgroups: gmane.emacs.devel Subject: Re: emacs' turn: remove useless if-before-free tests Date: Sun, 8 Jun 2008 12:53:25 +0200 Message-ID: <20080608105325.GB42765@orion.lan> References: <87fxryjv2n.fsf@rho.meyering.net> <87abi4fjnp.fsf@rho.meyering.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="CE+1k2dSO48ffgeK" X-Trace: ger.gmane.org 1212922424 27265 80.91.229.12 (8 Jun 2008 10:53:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2008 10:53:44 +0000 (UTC) Cc: Stefan Monnier , Emacs development discussions To: Jim Meyering Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 08 12:54:26 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K5IXa-0007op-4w for ged-emacs-devel@m.gmane.org; Sun, 08 Jun 2008 12:54:26 +0200 Original-Received: from localhost ([127.0.0.1]:34877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5IWn-00040I-3W for ged-emacs-devel@m.gmane.org; Sun, 08 Jun 2008 06:53:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K5IWi-000407-Jn for emacs-devel@gnu.org; Sun, 08 Jun 2008 06:53:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K5IWi-0003zv-6h for emacs-devel@gnu.org; Sun, 08 Jun 2008 06:53:32 -0400 Original-Received: from [199.232.76.173] (port=50009 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5IWi-0003zq-2X for emacs-devel@gnu.org; Sun, 08 Jun 2008 06:53:32 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.157]:20883) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K5IWh-0000ZM-MF for emacs-devel@gnu.org; Sun, 08 Jun 2008 06:53:31 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l26so1581585fgb.30 for ; Sun, 08 Jun 2008 03:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to; bh=lIFTKpxuO7F/pd8ifgiG/wMwM4sQ35QlxLIuERwGeM4=; b=NNy5JNSwHldpsncArbX28Scv/kgblejoC32Qru4cZCoXeVtNDqDd9Fk99fDeKI6k9r knG4YWDubIo+zdlFSRVbQILYePnN/+NQSs0QDApBoOSYKe0+UpFfbVMI/xgB7n4ZbA/W iVl2boRBgdlFng2WIjhgkTLyumled46Tw2kUw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; b=TOikAfpuo1UbVyR70tUPvUFIK8K/PGF/rwt+oq4xGahgGS0g7njKojdqIw/dd+vXw/ fvjbYAvq2vnQKXFp1pgqShslodrqvCpknvq9i5ci8Tcp4q9jIEwbKziVgqjwcb3bETF/ TCsbc4F2vOaOuBEQr2IBr6f4fITDX3j0EKsSo= Original-Received: by 10.86.80.5 with SMTP id d5mr2836812fgb.11.1212922409840; Sun, 08 Jun 2008 03:53:29 -0700 (PDT) Original-Received: from localhost ( [79.27.100.177]) by mx.google.com with ESMTPS id d6sm9527848fga.2.2008.06.08.03.53.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 08 Jun 2008 03:53:28 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87abi4fjnp.fsf@rho.meyering.net> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98686 Archived-At: --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 02, 2008 at 08:14:18AM +0200, Jim Meyering wrote: > Stefan Monnier wrote: > > Sounds like a good cleanup. > > Feel free to install it unless there's a strong objection. > > Thanks. I've committed those three change sets. This patch introduced a problem on os x, free on os x is redirected to unexmacosx.c:unexec_free, which does not support a NULL argument in an undumped emacs. The attached patch changes the problematic free call to xfree, as done a few lines below for another pointer. Emanuele --CE+1k2dSO48ffgeK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="free.diff" diff --git a/src/lread.c b/src/lread.c index e5e77bc..3e0bd1f 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1269,7 +1269,7 @@ Return t if the file exists and loads successfully. */) UNGCPRO; - free (saved_doc_string); + xfree (saved_doc_string); saved_doc_string = 0; saved_doc_string_size = 0; --CE+1k2dSO48ffgeK--