argv = nargv;
do_all(action)	int action;{	FILE *f;	char line[_POSIX2_LINE_MAX];	char *cp, **argv;	int argc, rval = 0;	gid_t egid;	egid = getegid();	setegid(getgid());	if ((f = fopen(ccdconf, "r")) == NULL) {		setegid(egid);		warn("fopen: %s", ccdconf);		return (1);	}	setegid(egid);	while (fgets(line, sizeof(line), f) != NULL) {		argc = 0;		argv = NULL;		++lineno;		if ((cp = strrchr(line, '\n')) != NULL)			*cp = '\0';		/* Break up the line and pass it's contents to do_single(). */		if (line[0] == '\0')			goto end_of_line;		for (cp = line; (cp = strtok(cp, " \t")) != NULL; cp = NULL) {			if (*cp == '#')				break;			if ((argv = realloc(argv,			    sizeof(char *) * ++argc)) == NULL) {				warnx("no memory to configure ccds");				return (1);			}			argv[argc - 1] = cp;			/*			 * If our action is to unconfigure all, then pass			 * just the first token to do_single() and ignore			 * the rest.  Since this will be encountered on			 * our first pass through the line, the Right			 * Thing will happen.			 */			if (action == CCD_UNCONFIGALL) {				if (do_single(argc, argv, action))					rval = 1;				goto end_of_line;			}		}		if (argc != 0)			if (do_single(argc, argv, action))				rval = 1; end_of_line:		if (argv != NULL)			free(argv);	}	(void)fclose(f);	return (rval);}