On Sun, Feb 24, 2013 at 08:00:19PM -0600, Doug Goldstein wrote: > @@ -84,6 +105,9 @@ static int parse_acl_file(const char *filename, ACLList > *acl_list) > while (fgets(line, sizeof(line), f) != NULL) { > char *ptr = line; > char *cmd, *arg, *argend; > + struct dirent **include_list = NULL; > + int i, include_count; > + char *conf_file;
These new variables could be declared... > while (isspace(*ptr)) { > ptr++; > @@ -137,6 +161,37 @@ static int parse_acl_file(const char *filename, ACLList > *acl_list) > snprintf(acl_rule->iface, IFNAMSIZ, "%s", arg); > } > QSIMPLEQ_INSERT_TAIL(acl_list, acl_rule, entry); > + } else if (strcmp(cmd, "includedir") == 0) { ...here in the scope where they are used. > + include_count = scandir(arg, &include_list, > + filter_bridge_conf_dir, NULL); The POSIX scandir(3) spec and the Linux man page do not define what happens when the compar argument is NULL. You could use alphasort(3) here to make behavior clear.