tests/dir.c: Remove nested checker function

Move nested check function is_startup_config() outside main().

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-06-06 18:15:47 +02:00
1 parent efae15416c
commit 23703c75da
1 file changed
+9 -8
+9 -8
View File
@@ -39,14 +39,9 @@ static int cfg_dir_filter(const char *file)
return ! !strcmp(file, STARTUP_CONFIG); return ! !strcmp(file, STARTUP_CONFIG);
} }
int main(int argc, char *argv[]) static int is_startup_config(const char *entry)
{ {
int i, num; static int once = 1;
char *type = DIR_TYPE_CONFIG;
char **files;
int once = 1;
int is_startup_config(const char *entry) {
static char file[80]; static char file[80];
if (once) { if (once) {
@@ -60,7 +55,13 @@ int main(int argc, char *argv[])
} }
//printf ("Comparing link %s with entry %s\n", file, entry); //printf ("Comparing link %s with entry %s\n", file, entry);
return !strcmp(file, entry); return !strcmp(file, entry);
} }
int main(int argc, char *argv[])
{
int i, num;
char *type = DIR_TYPE_CONFIG;
char **files;
simulate_files(1); simulate_files(1);