While the signature is indeed <code> char * strchr(const char * needle, int haystack); <code> it is Bad Practice to actually accept the return into a char * (rather than const char * ) when the passed in needle is actually a <code> const char * </code>
The signature is the way it is so that, when you have a <code> const char * </code> you want to use as needle, the function lets you do that; but when you pass a <code> char * </code> as needle you still get back a (mutable) <code> char * </code>
So, since promiser is const:
<code> const char *nl = strchr(promiser, '\n'); </code>