use strchr() instead of strstr()

This commit is contained in:
rlar
2017-03-19 20:24:49 +01:00
parent bd50814677
commit dc6e1cb064
12 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -666,7 +666,7 @@ get_comma_separated_values( char *values[], char *str ) {
int count = 0;
char *ptr, *comma_ptr, keep;
while ( ( comma_ptr = strstr( str, "," ) ) != NULL ) {
while ( ( comma_ptr = strchr( str, ',' ) ) != NULL ) {
ptr = comma_ptr - 1;
while ( isspace_c(*ptr) ) ptr--;
ptr++; keep = *ptr; *ptr = '\0';