Re: svn commit: r241471 - head/share/man/man9

2012-10-12 Thread mdf
On Thu, Oct 11, 2012 at 9:55 PM, Gleb Smirnoff  wrote:
> On Fri, Oct 12, 2012 at 01:31:03AM +, 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
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r241471 - head/share/man/man9

2012-10-11 Thread Gleb Smirnoff
On Fri, Oct 12, 2012 at 01:31:03AM +, 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.

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r241471 - head/share/man/man9

2012-10-11 Thread Kevin Lo
Author: kevlo
Date: Fri Oct 12 01:31:02 2012
New Revision: 241471
URL: http://svn.freebsd.org/changeset/base/241471

Log:
  Since the moduledata structure member priv is a void pointer, using
  NULL instead of 0 when dealing with pointers.

Modified:
  head/share/man/man9/module.9

Modified: head/share/man/man9/module.9
==
--- head/share/man/man9/module.9Thu Oct 11 23:41:18 2012
(r241470)
+++ head/share/man/man9/module.9Fri Oct 12 01:31:02 2012
(r241471)
@@ -99,7 +99,7 @@ static int foo_handler(module_t mod, int
 static moduledata_t mod_data= {
 "foo",
 foo_handler,
-0
+   NULL
 };
 
 MODULE_VERSION(foo, 1);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"