pkgsrc/security/rats/patches/patch-aa
rillig dce06beb4e Added a patch that calls closedir() after scanning a directory. Now RATS
is able to scan much larger directories. :)

PKGREVISION++
2007-01-18 22:55:19 +00:00

21 lines
583 B
Text

$NetBSD: patch-aa,v 1.3 2007/01/18 22:55:19 rillig Exp $
--- engine.c.orig 2002-09-23 19:51:11.000000000 +0200
+++ engine.c 2007-01-18 23:51:57.000000000 +0100
@@ -1004,7 +1004,7 @@ void process_directory(char *filename, i
}
#else
if((dir=opendir(filename))==NULL) {
- fprintf(stderr,"There was a problem opening the directory.\n");
+ perror(filename);
return;
}
while((dirdata=readdir(dir))!=NULL) {
@@ -1019,6 +1019,7 @@ void process_directory(char *filename, i
dirdata->d_name);
process_file(buf,forcelang);
}
+ closedir(dir);
#endif
}