On Fri, 05 Nov 2004, Patrick McHardy wrote: > What if the C is the last byte ? There are also more str* commands below > that need a terminating 0-byte. IMNSHO, str* functions have no business in arbitrary data. I have a simple memstr() function in bogofilter that is GPL'd and can be imported into the kernel, I believe: http://cvs.sourceforge.net/viewcvs.py/*checkout*/bogofilter/bogofilter/src/memstr.c?rev=HEAD Yes, there is room for optimization, but as long as strstr isn't optimized, who cares. -- Matthias Andree - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html