if (cp = strchr(strptr, ','))
if ((cp = strchr(strptr, ',')))
static char *setmsgtypes(msgfac, str)	MSGFACILITY *msgfac;	char *str;{	static char ebuf[BUFSIZ];	register char *cp;	register char *strptr, *word;	register MSGTYPE *mtp;	/*	 * MF_SYSLOG is the only supported message facility for the server	 */	if (isserver && (msgfac->mf_msgfac != MF_SYSLOG && 			 msgfac->mf_msgfac != MF_FILE)) {		(void) snprintf(ebuf, sizeof(ebuf),		"The \"%s\" message facility cannot be used by the server.",			       msgfac->mf_name);		return(ebuf);	}	strptr = str;	/*	 * Do any necessary Message Facility preparation	 */	switch(msgfac->mf_msgfac) {	case MF_FILE:		/*		 * The MF_FILE string should look like "<file>=<types>".		 */		if ((cp = strchr(strptr, '=')) == NULL)			return(			   "No file name found for \"file\" message facility");		*cp++ = CNULL;		if ((msgfac->mf_fptr = fopen(strptr, "w")) == NULL)			fatalerr("Cannot open log file for writing: %s: %s.",				 strptr, SYSERR);		msgfac->mf_filename = strdup(strptr);		strptr = cp;		break;	case MF_NOTIFY:		break;	case MF_STDOUT:		msgfac->mf_fptr = stdout;		break;	case MF_SYSLOG:#if defined(LOG_OPTS)#if	defined(LOG_FACILITY)		openlog(progname, LOG_OPTS, LOG_FACILITY);#else		openlog(progname, LOG_OPTS);#endif	/* LOG_FACILITY */#endif	/* LOG_OPTS */		break;	}	/*	 * Parse each type word	 */	msgfac->mf_msgtypes = 0;	/* Start from scratch */	while (strptr) {		word = strptr;		if (cp = strchr(strptr, ','))			*cp++ = CNULL;		strptr = cp;		if (mtp = getmsgtype(word)) {			msgfac->mf_msgtypes |= mtp->mt_type;			/*			 * XXX This is really a kludge until we add real			 * control over debugging.			 */			if (!debug && isserver && 			    strcasecmp(word, "debug") == 0)				debug = DM_ALL;		} else {			(void) snprintf(ebuf, sizeof(ebuf),					"Message type \"%s\" is invalid.",					word);			return(ebuf);		}	}	return((char *) NULL);}