Date: Wed, 10 Oct 2001 05:34:03 +0400 From: "Andrey A. Chernov" <ache@nagual.pp.ru> To: Bakul Shah <bakul@bitblocks.com> Cc: Mike Barcroft <mike@FreeBSD.ORG>, freebsd-hackers@FreeBSD.ORG, audit@FreeBSD.ORG Subject: Re: strnstr(3) - New libc function for review Message-ID: <20011010053402.A86108@nagual.pp.ru> In-Reply-To: <200110100127.VAA22073@rodney.cnchost.com> References: <20011004215706.B34530@coffee.q9media.com> <200110100127.VAA22073@rodney.cnchost.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 09, 2001 at 18:27:38 -0700, Bakul Shah wrote: > > Why not pass the length of the pattern as well? Regardless, > why not use simpler code that is easier to prove right? > > char* > strnstr(const char *s, size_t slen, const chat *p, size_t plen) It clearly violates API, passing two lengths. Remember that FreeBSD is not unique with strnstr(), some others have it too. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011010053402.A86108>