From owner-svn-src-head@FreeBSD.ORG Mon Nov 19 16:26:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A650495C; Mon, 19 Nov 2012 16:26:29 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 833278FC12; Mon, 19 Nov 2012 16:26:29 +0000 (UTC) Received: from [IPv6:2601:9:4d00:85:84f9:e144:8dee:996b] (unknown [IPv6:2601:9:4d00:85:84f9:e144:8dee:996b]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 07FDC3981E; Mon, 19 Nov 2012 08:26:28 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: svn commit: r243262 - head/usr.bin/top From: Rui Paulo In-Reply-To: <20121119082618.GB67020@FreeBSD.org> Date: Mon, 19 Nov 2012 08:26:28 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <3241E07C-D177-4297-825A-A52FEA8F1241@FreeBSD.org> References: <201211190803.qAJ83eRo014127@svn.freebsd.org> <20121119082618.GB67020@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1499) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2012 16:26:29 -0000 On 19 Nov 2012, at 00:26, Alexey Dokuchaev wrote: > On Mon, Nov 19, 2012 at 08:03:40AM +0000, Rui Paulo wrote: >> New Revision: 243262 >> URL: http://svnweb.freebsd.org/changeset/base/243262 >>=20 >> - cmdbuf =3D (char *)malloc(cmdlengthdelta + 1); >> + cmdbuf =3D (char *)malloc(cmdlen + 1); >=20 > Why explicitly casting malloc return() value (void *)? Why are you asking me about code I didn't write? :-) I don't want to mix style changes with functional changes so I let it = be. If you're asking why our source tree has malloc casts, it's because = compilers in the 1980s used to be unnecessarily more pedantic. Regards, -- Rui Paulo