From owner-svn-src-all@FreeBSD.ORG Thu Oct 23 16:44:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52C851065674; Thu, 23 Oct 2008 16:44:38 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 10A178FC0C; Thu, 23 Oct 2008 16:44:37 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 5D2BE6D44C; Thu, 23 Oct 2008 16:44:36 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 4D59B84515; Thu, 23 Oct 2008 18:44:36 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: src-committers@freebsd.org References: <200810231553.m9NFrqQj060598@svn.freebsd.org> Date: Thu, 23 Oct 2008 18:44:36 +0200 In-Reply-To: <200810231553.m9NFrqQj060598@svn.freebsd.org> (Dag-Erling Smorgrav's message of "Thu, 23 Oct 2008 15:53:52 +0000 (UTC)") Message-ID: <861vy71csr.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r184205 - in head: . share/man/man9 sys/arm/arm sys/cam/scsi sys/compat/linux sys/contrib/altq/altq sys/contrib/ipfilter/netinet sys/dev/ar sys/dev/ce sys/dev/hwpmc sys/dev/lmc sys/dev/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2008 16:44:38 -0000 Dag-Erling Smorgrav writes: > Retire the MALLOC and FREE macros. They are an abomination unto style(9). The following one-liner can be used to convert existing code: find . -type f -name \*.c | xargs perl -p -i -e ' s/\bMALLOC(\s*\()([^,]+?),\s*([^,]+?),\s*/$2 =3D malloc$1/; s/\bFREE(\s*\()/free$1/; ' Or if you absolutely positively want the useless cast: find . -type f -name \*.c | xargs perl -p -i -e ' s/\bMALLOC(\s*\()([^,]+?),\s*([^,]+?),\s*/$2 =3D ($3)malloc$1/; s/\bFREE(\s*\()/free$1/; ' DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no