Re: [Patch 1/2] add for_each_substring() and match_substring()

From: Bastian Blank
Date: Thu Mar 08 2007 - 11:44:05 EST


On Tue, Mar 06, 2007 at 08:19:23PM +0100, Martin Peschke wrote:
> +char *match_to(const char *cs, const char *ct)
> +{
> + char *delim = strpbrk(cs, ct);
> + if (delim)
> + return delim;
> + else if (*cs != '\0')
> + return (char *)(cs + strlen(cs));

This disallows the use of match_to with a real constant char array,
please remove the const from the prototyp.

Bastian

--
"Get back to your stations!"
"We're beaming down to the planet, sir."
-- Kirk and Mr. Leslie, "This Side of Paradise",
stardate 3417.3
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/