From owner-svn-src-head@freebsd.org Thu Jul 19 20:12:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA00E1048565; Thu, 19 Jul 2018 20:12:23 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6752C785B9; Thu, 19 Jul 2018 20:12:23 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=58646 helo=[10.0.0.104]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fgFHh-000MFd-0l; Thu, 19 Jul 2018 20:12:21 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 From: Devin Teske In-Reply-To: <1532030389.1344.9.camel@freebsd.org> Date: Thu, 19 Jul 2018 13:12:19 -0700 Cc: Devin Teske , Alexey Dokuchaev , Michael Tuexen , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719195302.GA26853@FreeBSD.org> <1532030389.1344.9.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 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: Thu, 19 Jul 2018 20:12:24 -0000 > On Jul 19, 2018, at 12:59 PM, Ian Lepore wrote: >=20 > On Thu, 2018-07-19 at 19:53 +0000, Alexey Dokuchaev wrote: >>> +++ head/sys/netinet/sctp_asconf.c Thu Jul 19 19:33:42 2018 = (r336503) >>> static struct mbuf * >>> -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t = *error_tlv, >>> +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * = error_tlv, >>=20 >> This looks strange now. In C, asterisk is usually placed by the = variable. >=20 > "usually" may be true of freebsd, but most places I've worked consider > the * (and & in c++) to be more associated with the type being = declared > than with the variable name, thus they get snugged up against the type > info, not the var name. Putting the * or & with the var name leads to > particularly bad constructs such as=20 >=20 > int a, *b; >=20 > which, for maximal clarity, should be: >=20 > int a; > int* b; >=20 Are we free to prefer the former in C if that's how we've been coding in = C for 20+ years? --=20 Devin=