mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
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:
7
logger.c
7
logger.c
@@ -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;
|
||||
|
Reference in New Issue
Block a user