don't unnecessarily open-code strchr()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Kevin P. Fleming 20 years ago
parent 64ee493b54
commit 71f2c0c6ec

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

Loading…
Cancel
Save