diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:56:15 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:56:15 +0100 |
commit | 1542c122b3672fe83e027411ad2445772e2d0ed3 (patch) | |
tree | e535bc621bd7ffa9d5ce89e0d495df5d1c4ab6fd /app/tools/listxtp.c | |
parent | 773810e6583142d7d15263e6481c42aebed6d7f1 (diff) | |
parent | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (diff) |
Update upstream source from tag 'upstream/5.1.0'
Update to upstream version '5.1.0'
with Debian dir 93ca74b8b4602fce4c9c7740e0cfdde25f086673
Diffstat (limited to 'app/tools/listxtp.c')
-rw-r--r-- | app/tools/listxtp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/tools/listxtp.c b/app/tools/listxtp.c index 384c0d5..35d0daa 100644 --- a/app/tools/listxtp.c +++ b/app/tools/listxtp.c @@ -31,6 +31,7 @@ #define TRUE 1 #define FALSE 0 +#define MAX_FILES 500 #ifdef _WIN32 #define WIKIFORMATOPTION "/w" #pragma warning( disable : 4996 ) @@ -70,7 +71,7 @@ main( int argc, char **argv ) struct stat buf; char filename[ 256 ]; char path[ 256 ]; - char *results[100]; + char *results[MAX_FILES]; int cnt = 0; int i; int bWiki = FALSE; @@ -115,7 +116,7 @@ main( int argc, char **argv ) /* * get all files from the directory */ - while( ent = readdir( d )) + while((ent = readdir(d))) { /* * create full file name and get the state for that file @@ -152,7 +153,7 @@ main( int argc, char **argv ) results[ cnt ] = malloc( strlen( buffer ) + 1 ); strcpy( results[ cnt ], buffer ); cnt++; - if( cnt == 100 ) { + if( cnt == MAX_FILES ) { fprintf( stderr, "Error: too many files\n" ); exit( 1 ); } |