break; case F_MEMBUF: ringbuf_free(f->f_un.f_mb.f_rb);
init(void){	char cline[LINE_MAX], prog[NAME_MAX+1], *p;	struct filed *f, *next, **nextp;	FILE *cf;	int i;	dprintf("init\n");	/* If config file has been modified, then just die to restart */	if (priv_config_modified()) {		dprintf("config file changed: dying\n");		die(0);	}	/*	 *  Close all open log files.	 */	Initialized = 0;	for (f = Files; f != NULL; f = next) {		/* flush any pending output */		if (f->f_prevcount)			fprintlog(f, 0, (char *)NULL);		switch (f->f_type) {		case F_FILE:		case F_TTY:		case F_CONSOLE:			(void)close(f->f_file);			break;		case F_FORW:			break;		}		next = f->f_next;		if (f->f_program)			free(f->f_program);		free((char *)f);	}	Files = NULL;	nextp = &Files;	/* open the configuration file */	if ((cf = priv_open_config()) == NULL) {		dprintf("cannot open %s\n", ConfFile);		*nextp = cfline("*.ERR\t/dev/console", "*");		(*nextp)->f_next = cfline("*.PANIC\t*", "*");		Initialized = 1;		return;	}	/*	 *  Foreach line in the conf table, open that file.	 */	f = NULL;	strlcpy(prog, "*", sizeof(prog));	while (fgets(cline, sizeof(cline), cf) != NULL) {		/*		 * check for end-of-section, comments, strip off trailing		 * spaces and newline character. !prog is treated		 * specially: the following lines apply only to that program.		 */		for (p = cline; isspace(*p); ++p)			continue;		if (*p == '\0' || *p == '#')			continue;		if (*p == '!') {			p++;			while (isspace(*p))				p++;			if (!*p || (*p == '*' && (!p[1] || isspace(p[1])))) {				strlcpy(prog, "*", sizeof(prog));				continue;			}			for (i = 0; i < NAME_MAX; i++) {				if (!isalnum(p[i]) && p[i] != '-' && p[i] != '!')					break;				prog[i] = p[i];			}			prog[i] = 0;			continue;		}		p = cline + strlen(cline);		while (p > cline)			if (!isspace(*--p)) {				p++;				break;			}		*p = '\0';		f = cfline(cline, prog);		if (f != NULL) {			*nextp = f;			nextp = &f->f_next;		}	}	/* close the configuration file */	(void)fclose(cf);	Initialized = 1;	if (Debug) {		for (f = Files; f; f = f->f_next) {			for (i = 0; i <= LOG_NFACILITIES; i++)				if (f->f_pmask[i] == INTERNAL_NOPRI)					printf("X ");				else					printf("%d ", f->f_pmask[i]);			printf("%s: ", TypeNames[f->f_type]);			switch (f->f_type) {			case F_FILE:			case F_TTY:			case F_CONSOLE:				printf("%s", f->f_un.f_fname);				break;			case F_FORW:				printf("%s", f->f_un.f_forw.f_hname);				break;			case F_USERS:				for (i = 0; i < MAXUNAMES && *f->f_un.f_uname[i]; i++)					printf("%s, ", f->f_un.f_uname[i]);				break;			case F_MEMBUF:				printf("%s", f->f_un.f_mb.f_mname);				break;			}			if (f->f_program)				printf(" (%s)", f->f_program);			printf("\n");		}	}	logmsg(LOG_SYSLOG|LOG_INFO, "syslogd: restart", LocalHostName,	    ADDDATE);	dprintf("syslogd: restarted\n");}