author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Fri, 05 Mar 2010 22:03:16 +0100 | |
changeset 112 | 9bfb339a8156 |
parent 111 | 2247473fd12d |
child 113 | 397270b5d21a |
--- a/fts.c +++ b/fts.c @@ -43,8 +43,9 @@ } paths[i] = NULL; + errno = 0; - if ((fts = fts_open (paths, FTS_NOSTAT, &compare)) == NULL) { + if ((fts = fts_open (paths, FTS_NOSTAT, (void *)&compare)) == NULL) { perror ("fts_open"); return EXIT_FAILURE; } @@ -52,6 +53,8 @@ while ((current = fts_read (fts)) != NULL) { if (!errno) printf ("%s/%s\n", current->fts_path, current->fts_name); + else + perror ("fts_read"); } if (fts_close (fts) < 0)