Returns: pointer to substring in string, or NULL if not found
*/
-uschar *
-strstric(uschar * s, uschar * t, BOOL space_follows)
+const uschar *
+strstric_c(const uschar * s, const uschar * t, BOOL space_follows)
{
-uschar * p = t;
-uschar * yield = NULL;
+const uschar * p = t;
+const uschar * yield = NULL;
int cl = tolower(*p);
int cu = toupper(*p);
return NULL;
}
+uschar *
+strstric(uschar * s, uschar * t, BOOL space_follows)
+{
+return US strstric_c(s, t, space_follows);
+}
#ifdef COMPILE_UTILITY
Note that a NUL is not added, though space is left for one. This is
because string_cat() is often called multiple times to build up a
string - there's no point adding the NUL till the end.
+ NULL is a possible return.
*/
/* coverity[+alloc] */
if (count < 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"internal error in string_catn (count %d)", count);
+if (count == 0) return g;
if (!g)
{