diff -r 4508da679ffb -r 778388400f7b cline.c --- a/cline.c Thu Oct 20 17:29:23 2011 +0200 +++ b/cline.c Fri Oct 21 15:09:26 2011 +0200 @@ -153,17 +153,8 @@ finder = strtok(NULL, ","); } - /* Open directory */ - DIR *dir = opendir(directory); - if (dir == NULL) { - perror("Operation failed"); - destroy_settings_t(settings); - return 1; - } - /* Scan directory */ - int lines = scanDirectory(dir, 0, directory, settings); - closedir(dir); + int lines = scanDirectory((scanner_t){directory, 0}, settings); destroy_settings_t(settings); /* Print double line and line count */