From 8d1a287c1a30ae986090c8a6016c4d00b6d9276c Mon Sep 17 00:00:00 2001 From: imp Date: Tue, 3 Feb 2009 20:25:36 +0000 Subject: Fix the functions to match prototypes. The K&R definitions differ from the ANSI-C prototype due to the 'int promotion' rule. --- lib/libc/string/memchr.c | 2 +- lib/libc/string/strmode.c | 2 +- lib/libc/string/wmemset.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c index 47d37db..6d7c2fd 100644 --- a/lib/libc/string/memchr.c +++ b/lib/libc/string/memchr.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include void * -memchr(const void *s, unsigned char c, size_t n) +memchr(const void *s, int c, size_t n) { if (n != 0) { const unsigned char *p = s; diff --git a/lib/libc/string/strmode.c b/lib/libc/string/strmode.c index 855e1b5..57295d7 100644 --- a/lib/libc/string/strmode.c +++ b/lib/libc/string/strmode.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include void -strmode(mode_t mode, char *p) +strmode(/* mode_t */ int mode, char *p) { /* print type */ switch (mode & S_IFMT) { diff --git a/lib/libc/string/wmemset.c b/lib/libc/string/wmemset.c index 362bdf2..0e96356 100644 --- a/lib/libc/string/wmemset.c +++ b/lib/libc/string/wmemset.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include wchar_t * -wmemset(wchar_t *s, wchar_t *c, size_t n) +wmemset(wchar_t *s, wchar_t c, size_t n) { size_t i; wchar_t *p; -- cgit v1.1