don't unnecessarily open-code strchr()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-04-02 23:20:11 +00:00
parent 64ee493b54
commit 71f2c0c6ec

View File

@@ -606,16 +606,15 @@ void close_logger(void)
static void strip_coloring(char *str)
{
char *src = str, *dest, *end;
char *src, *dest, *end;
if (!src)
return;
/* find the first potential escape sequence in the string */
while (*src && (*src != '\033'))
src++;
if (!*src)
src = strchr(str, '\033');
if (!src)
return;
dest = src;