1.1 --- a/cline.c Thu Oct 20 17:29:23 2011 +0200 1.2 +++ b/cline.c Fri Oct 21 15:09:26 2011 +0200 1.3 @@ -153,17 +153,8 @@ 1.4 finder = strtok(NULL, ","); 1.5 } 1.6 1.7 - /* Open directory */ 1.8 - DIR *dir = opendir(directory); 1.9 - if (dir == NULL) { 1.10 - perror("Operation failed"); 1.11 - destroy_settings_t(settings); 1.12 - return 1; 1.13 - } 1.14 - 1.15 /* Scan directory */ 1.16 - int lines = scanDirectory(dir, 0, directory, settings); 1.17 - closedir(dir); 1.18 + int lines = scanDirectory((scanner_t){directory, 0}, settings); 1.19 destroy_settings_t(settings); 1.20 1.21 /* Print double line and line count */