From owner-cvs-all Fri May 17 0:25:52 2002 Delivered-To: cvs-all@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id EE6D937B401; Fri, 17 May 2002 00:25:39 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id CAF7DAE1FE; Fri, 17 May 2002 00:25:39 -0700 (PDT) Date: Fri, 17 May 2002 00:25:39 -0700 From: Alfred Perlstein To: "J. Mallett" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/rpcbind check_bound.c rpcb_svc_4.c rpcb_svc_com.c rpcbind.c Message-ID: <20020517072539.GI20683@elvis.mu.org> References: <200205170527.g4H5Rra32389@freefall.freebsd.org> <20020517070658.GH20683@elvis.mu.org> <20020517071532.GA1511@FreeBSD.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020517071532.GA1511@FreeBSD.ORG> User-Agent: Mutt/1.3.27i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * J. Mallett [020517 00:14] wrote: > On Fri, May 17, 2002 at 12:06:58AM -0700, Alfred Perlstein wrote: > > * J. Mallett [020516 22:27] wrote: > > > jmallett 2002/05/16 22:27:53 PDT > > > > > > Modified files: > > > usr.sbin/rpcbind check_bound.c rpcb_svc_4.c rpcb_svc_com.c > > > rpcbind.c > > > Log: > > > Stop this program's abuse of malloc(3). Its return value doesn't need these > > > ugly explicit casts, and its argument doesn't need explicitly cast to u_int, > > > especially if sizeof() is being used. > > > > from style(9): > > > > Casts and sizeof's are not followed by a space. Note that indent(1) does > > not understand this rule. > > I didn't change the existing indentation/spacing style, on purpose. Yes you did. :) *** 170,179 **** /* * add to the end of the list */ ! rbl = (rpcblist_ptr) malloc((u_int)sizeof (RPCBLIST)); ! if (rbl == (rpcblist_ptr)NULL) { return (FALSE); - } a = &(rbl->rpcb_map); a->r_prog = reg.r_prog; a->r_vers = reg.r_vers; --- 170,178 ---- /* * add to the end of the list */ ! rbl = malloc(sizeof (RPCBLIST)); ! if (rbl == NULL) return (FALSE); a = &(rbl->rpcb_map); a->r_prog = reg.r_prog; a->r_vers = reg.r_vers; You also made it harder to see what has changed from our rpcbind from the tirpc95 to the tirpc99 distribution. But whatever. :) -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message