[Assorted-commits] SF.net SVN: assorted: [340] hash-join/trunk/src/hashjoin.cc
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-09 05:11:51
|
Revision: 340 http://assorted.svn.sourceforge.net/assorted/?rev=340&view=rev Author: yangzhang Date: 2008-02-08 21:11:38 -0800 (Fri, 08 Feb 2008) Log Message: ----------- fixed some gcc-4.2 issues Modified Paths: -------------- hash-join/trunk/src/hashjoin.cc Modified: hash-join/trunk/src/hashjoin.cc =================================================================== --- hash-join/trunk/src/hashjoin.cc 2008-02-07 18:43:54 UTC (rev 339) +++ hash-join/trunk/src/hashjoin.cc 2008-02-09 05:11:38 UTC (rev 340) @@ -116,7 +116,7 @@ * Look for a substring, but without null-termination conventions. */ inline char * -unsafe_strstr(char *p, char *q, char *lim) +unsafe_strstr(char *p, const char *q, const char *lim) { if (lim == 0) { while (true) { @@ -134,6 +134,15 @@ } /** + * Look for a substring, but without null-termination conventions. + */ +inline const char* +unsafe_strstr(const char *p, const char *q, const char *lim) +{ + return unsafe_strstr((char*) p, q, lim); +} + +/** * Load an entire file into buf and also give us the length of the buffer. * TODO this probably isn't very safe, since we're demoting an off_t to a * size_t. Is there a healthier approach? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |