# HG changeset patch # User reimar # Date 1390050894 0 # Node ID 0f2c90b69a122e11e480ecef9017ae69490b014f # Parent 294261f7e1b5ca2eb2fb5b16006602e6eee2e14d vo_bl: Use strcspn diff -r 294261f7e1b5 -r 0f2c90b69a12 libvo/vo_bl.c --- a/libvo/vo_bl.c Sat Jan 18 13:07:40 2014 +0000 +++ b/libvo/vo_bl.c Sat Jan 18 13:14:54 2014 +0000 @@ -399,7 +399,7 @@ return 1; } p += 5; - while (*q != ',' && *q != '\0') q++; + q += strcspn(q, ","); if (*q == '\0') end = 1; *q = '\0'; bl_files[no_bl_files].name = p; @@ -412,12 +412,12 @@ return 1; } p += 5; - while (*q != ',' && *q != '\0' && *q != ':') q++; + q += strcspn(q, ",:"); if (*q == ':') { *q++ = '\0'; bl_hosts[no_bl_hosts].name = p; bl_hosts[no_bl_hosts].port = atoi(q); - while (*q != ',' && *q != '\0') q++; + q += strcspn(q, ","); if (*q == '\0') end = 1; } else { /* use default port */