Re: svn commit: r188098 - head/lib/libc/string

[ Available lists | Index of svn-src-all | Month of Feb 2009 | Week of 3 Feb 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Christoph Mallon <christoph.mallon@gmx.de>
Date
3 Feb 2009 20:39:37
Subject
Re: svn commit: r188098 - head/lib/libc/string
Message-ID
4988AB83.2050203@gmx.de


[ Hide this part ]
Warner Losh schrieb:
> Author: imp
> Date: Tue Feb 3 20:25:36 2009
> New Revision: 188098
> URL: http://svn.freebsd.org/changeset/base/188098
>
> Log:
> Fix the functions to match prototypes. The K&R definitions differ
> from the ANSI-C prototype due to the 'int promotion' rule.
>
> Modified:
> head/lib/libc/string/memchr.c
> head/lib/libc/string/strmode.c
> head/lib/libc/string/wmemset.c
[...]
> Modified: head/lib/libc/string/strmode.c
> ==============================================================================
> --- head/lib/libc/string/strmode.c Tue Feb 3 20:01:51 2009 (r188097)
> +++ head/lib/libc/string/strmode.c Tue Feb 3 20:25:36 2009 (r188098)
> @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
> #include <string.h>
>
> void
> -strmode(mode_t mode, char *p)
> +strmode(/* mode_t */ int mode, char *p)
> {
> /* print type */
> switch (mode & S_IFMT) {

The manpage states that the first parameter of strmode() is a mode_t.
What's wrong - the implementation (both in header and definition) or the
documentation?


Elapsed time: 0.326 seconds