From owner-svn-src-head@FreeBSD.ORG Wed Feb 5 01:29:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3743B7F for ; Wed, 5 Feb 2014 01:29:14 +0000 (UTC) Received: from mail-qc0-x234.google.com (mail-qc0-x234.google.com [IPv6:2607:f8b0:400d:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A2441375 for ; Wed, 5 Feb 2014 01:29:14 +0000 (UTC) Received: by mail-qc0-f180.google.com with SMTP id i17so15033229qcy.39 for ; Tue, 04 Feb 2014 17:29:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=NY+xQISBiInJmIXLrtAn1+/kwRc49T3N2hv80E1siUs=; b=kZ/aqkFDqA6uI+8ehgEh+Vt55+3J0w6V2fb9Alc+zIH5XBedjFIhz/wAoTg45GM2+p HbPg7IW+q9OlOuq6OLdzAKNqQnenD3Ia6ojCz306AfL6SQNucHv8V71PxE8e8lBmNj4K rGyGPPq3wseQjhsYClxv7MA+f6Fq/ZTUf69pM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=NY+xQISBiInJmIXLrtAn1+/kwRc49T3N2hv80E1siUs=; b=D2JdI/JvYlebHxX6wHMqa5e1+6xeeIsiz5kPwp/pXbT5FEgkzuQ0SVKXlkXaggDuSP ECWo1HHgqV6HaPfqHTuIum/Y0VUMVcSnq3GwPiC9PLcAzK7RS+CUa7mpXsUBpFSqkfYl XITlM0YjGoEJn9ngoHSSs/iXPF/pf+1KVR8iyHNxxZDs7VdAwCZ44uNc1NzY/QPGRUcK jf0ezCUNPOcjIvzMrJOP6sO2TNODyK/PJt2MM1TUQoB93i/lMbf9rBz3KzRm+rB4d88J MUn0vWP2XdYZtOWSEGnRNpZ4RVptOZ7JKGS7kJnM3C/1Gfys/To4gJ4GJHvDefCSyjj6 fZeg== X-Gm-Message-State: ALoCoQmdcBc9qgVb3cQth4SvPHUtrwYtqI7xA4qSG40ODMi8Vs6aPrtH92yv45IgIPpTqyK8wouZ X-Received: by 10.140.85.179 with SMTP id n48mr66436402qgd.91.1391563753594; Tue, 04 Feb 2014 17:29:13 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.30.229 with HTTP; Tue, 4 Feb 2014 17:28:43 -0800 (PST) In-Reply-To: <20140204164703.S1229@besplex.bde.org> References: <201402040301.s1431XgK027156@svn.freebsd.org> <20140204164703.S1229@besplex.bde.org> From: Eitan Adler Date: Tue, 4 Feb 2014 20:28:43 -0500 X-Google-Sender-Auth: kyXFJjX8KJYyked4A1Qq13oeo14 Message-ID: Subject: Re: svn commit: r261454 - head/lib/libc/net To: Bruce Evans Content-Type: text/plain; charset=UTF-8 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.17 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: Wed, 05 Feb 2014 01:29:14 -0000 On Tue, Feb 4, 2014 at 1:29 AM, Bruce Evans wrote: > On Tue, 4 Feb 2014, Eitan Adler wrote: > >> Log: >> libc/net: Fix some issues in inet6_opt_init() (from RFC 3542): >> >> * The RFC says (in section 10.1) that only when extbuf is not NULL, >> extlen shall be checked, so don't perform this check when NULL is >> passed. >> >> * socklen_t is unsigned, so checking extlen for less than zero is >> not needed. > > > Why be so unportable? socklen_t is not necessarily unsigned. When I checked prior to commit I read ' makes available a type, socklen_t, which is an unsigned opaque integral type of length of at least 32 bits. ' After checking again it turns out that this quote is from SUSv2 which is just a bit old. In any case switching the line to <= 0 won't add any real value now. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams