changeset 36506:0f2c90b69a12

vo_bl: Use strcspn
author reimar
date Sat, 18 Jan 2014 13:14:54 +0000
parents 294261f7e1b5
children faf406e38545
files libvo/vo_bl.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 */