From d1a8285f818eb7e5c3d6a05709ea21a808490b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 19 Mar 2018 19:55:58 +0100 Subject: New upstream version 5.1.0 --- app/tools/listxtp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/tools/listxtp.c') 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 ); } -- cgit v1.2.3