while (p = strchr(p, ','))
while ((p = strchr(p, ',')) != NULL)
static int **config_parse_envelope(const char *cp, int *num){	const char *p, *px;	int **env_list;	int i, j;		/* count num */	*num = 1, p = cp;	while (p = strchr(p, ','))		(*num)++, p++;	/* alloc */	env_list = (int **) safe_malloc((*num) * sizeof(int *));	for (i = 0; i < *num; i++)		env_list[i] = (int *) safe_malloc(6 * sizeof(int));	/* init */	for (i = 0; i < *num; i++)		for (j = 0; j < 6; j++)			env_list[i][j] = -1;	/* regist */	for (i = 0, p = cp; i < *num; i++, p++) {		px = strchr(p, ',');		for (j = 0; j < 6; j++, p++) {			if (*p == ':')				continue;			env_list[i][j] = atoi(p);			if (! (p = strchr(p, ':')))				break;			if (px && p > px)				break;		}		if (! (p = px))			break;	}	return env_list;}