From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 14:51:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C08108E5; Fri, 12 Oct 2012 14:51:06 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 772188FC14; Fri, 12 Oct 2012 14:51:06 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so3244098pbb.13 for ; Fri, 12 Oct 2012 07:51:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9a4egDtGJEbp5m1TvEVhGm0w/7Dca2MQpMxA5naD7AA=; b=gUKZ19uSwEdzKMvqyEqNlO+v3Q8zEdc73hiA1Vf0jqfPN1y0hOwE/idHbHkZek/Uz6 AUf8+Tlni6TRo22E4MtXgVVk0omd2qZCZo1fo1nO5/C6SFA4RXabsRGk7KtzccW/jLyI R778U+HL+RRA98Qi+zr9p1BjjyYE8Oftve9Mz/NpX4CBPtoncXROGBeZJ9t3Tmdgtu10 iYdt0RV/JX9ZnnPu2zheq/Kxu9reYhIi7sXgtnC1eXVC0Q5fAZvgPuTS6O56wqj/oI8q 7scVUl0r3FjDxXXAbfY+h/b70t1tfQShTuyLnaVtV6OQV81rp2oZmQFcdgemtZPWtS10 2kYw== MIME-Version: 1.0 Received: by 10.68.233.196 with SMTP id ty4mr14099235pbc.23.1350053465831; Fri, 12 Oct 2012 07:51:05 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.223.105 with HTTP; Fri, 12 Oct 2012 07:51:05 -0700 (PDT) In-Reply-To: <20121012045530.GK89655@FreeBSD.org> References: <201210120131.q9C1V3jM018799@svn.freebsd.org> <20121012045530.GK89655@FreeBSD.org> Date: Fri, 12 Oct 2012 07:51:05 -0700 X-Google-Sender-Auth: v6STCyl-zo_ptqhjfXOK8qOjl_k Message-ID: Subject: Re: svn commit: r241471 - head/share/man/man9 From: mdf@FreeBSD.org To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Kevin Lo , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2012 14:51:06 -0000 On Thu, Oct 11, 2012 at 9:55 PM, Gleb Smirnoff wrote: > On Fri, Oct 12, 2012 at 01:31:03AM +0000, Kevin Lo wrote: > K> Author: kevlo > K> Date: Fri Oct 12 01:31:02 2012 > K> New Revision: 241471 > K> URL: http://svn.freebsd.org/changeset/base/241471 > K> > K> Log: > K> Since the moduledata structure member priv is a void pointer, using > K> NULL instead of 0 when dealing with pointers. > K> > K> Modified: > K> head/share/man/man9/module.9 > K> > K> Modified: head/share/man/man9/module.9 > K> ============================================================================== > K> --- head/share/man/man9/module.9 Thu Oct 11 23:41:18 2012 (r241470) > K> +++ head/share/man/man9/module.9 Fri Oct 12 01:31:02 2012 (r241471) > K> @@ -99,7 +99,7 @@ static int foo_handler(module_t mod, int > K> static moduledata_t mod_data= { > K> "foo", > K> foo_handler, > K> - 0 > K> + NULL > K> }; > K> > K> MODULE_VERSION(foo, 1); > > I think we should provide C99 sparse initializers for structures in > all manpages in section 9, as well as use only such initializers in any new > code added to tree. For man pages and .c files, that'd be fine. But since it's still possible to build C++ kernel modules, header files can't do this since named initializers don't have the same syntax in C++ (unless they fixed this in C++11?) Thanks, matthew