Date: Wed, 10 Oct 2001 21:02:06 -0400 From: Mike Barcroft <mike@FreeBSD.ORG> To: "Andrew L. Neporada" <andrew@nas.dgap.mipt.ru> Cc: audit@FreeBSD.ORG Subject: Re: strnstr(3) - New libc function for review Message-ID: <20011010210206.G49828@coffee.q9media.com> In-Reply-To: <Pine.BSF.4.21.0110101958250.51458-200000@nas.dgap.mipt.ru>; from andrew@nas.dgap.mipt.ru on Wed, Oct 10, 2001 at 08:16:27PM %2B0400 References: <20011010115210.E49828@coffee.q9media.com> <Pine.BSF.4.21.0110101958250.51458-200000@nas.dgap.mipt.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew L. Neporada <andrew@nas.dgap.mipt.ru> writes: > On Wed, 10 Oct 2001, Mike Barcroft wrote: > > No, that's inconsistent with existing strn...() functions and totally > > defeats the purpose of my addition. > > Check attached test program. It prints "NULL". So either implementation or > man page is wrong. Yes, that's a documentation problem. I'll correct it today. strncmp(3) has a similar problem; I'll correct that as well. > > > P.P.S. In the case of binary strings it is possible to implement faster > > > search -- see attachment. > > > > Yes. > > Could you please comment my bstrstr implementation? I don't really understand the context. Are you proposing I use it instead of strnstr(3)? If so, that's not what strnstr(3) is intended to do; it's designed for strings only. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011010210206.G49828>