From owner-svn-src-head@freebsd.org Thu Jul 19 20:29:15 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 7D83310496B5; Thu, 19 Jul 2018 20:29:15 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 163837A327; Thu, 19 Jul 2018 20:29:15 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2001:67c:370:128:91bf:6c2e:4974:1f76] (unknown [IPv6:2001:67c:370:128:91bf:6c2e:4974:1f76]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 97155721E280D; Thu, 19 Jul 2018 22:29:11 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336503 - in head/sys: netinet netinet6 From: Michael Tuexen In-Reply-To: <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> Date: Thu, 19 Jul 2018 16:29:09 -0400 Cc: Ian Lepore , Alexey Dokuchaev , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7B5E13F1-A134-4762-BEC3-99FB3306621A@freebsd.org> References: <201807191933.w6JJXhof018383@repo.freebsd.org> <20180719195302.GA26853@FreeBSD.org> <1532030389.1344.9.camel@freebsd.org> <06745A7A-2E1C-4E48-ADCE-F42447B28A2C@FreeBSD.org> To: Devin Teske X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de 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:29:15 -0000 > On 19. Jul 2018, at 16:12, Devin Teske wrote: >=20 >=20 >> 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 >=20 > Are we free to prefer the former in C if that's how we've been coding = in C for 20+ years? The code you see is a result of running a formatting tool based on ident on code supporting a variety of platforms. Since ident has changed = recently I wanted to commit the corresponding whitespace changes separately, but used an older parametrisation of the script. So I reverted it in https://svnweb.freebsd.org/changeset/base/336508 and committed the correct version in https://svnweb.freebsd.org/changeset/base/336511 Best regards Michael > --=20 > Devin