Skip to content
Snippets Groups Projects
Commit 71f2c0c6 authored by Kevin P. Fleming's avatar Kevin P. Fleming
Browse files

don't unnecessarily open-code strchr()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 64ee493b
Branches
Tags
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment