Author: tkreuzer
Date: Sun Apr 14 19:49:34 2013
New Revision: 58764
URL:
http://svn.reactos.org/svn/reactos?rev=58764&view=rev
Log:
[LOG2LINES]
Use PATH_MAX instead of MAX_PATH. Patch by tower.
Modified:
trunk/reactos/tools/log2lines/cache.c
trunk/reactos/tools/log2lines/options.c
trunk/reactos/tools/log2lines/revision.c
trunk/reactos/tools/log2lines/util.c
Modified: trunk/reactos/tools/log2lines/cache.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/cache.c?re…
==============================================================================
--- trunk/reactos/tools/log2lines/cache.c [iso-8859-1] (original)
+++ trunk/reactos/tools/log2lines/cache.c [iso-8859-1] Sun Apr 14 19:49:34 2013
@@ -26,7 +26,7 @@
{
char Line[LINESIZE];
int res = 0;
- char iso_tmp[MAX_PATH];
+ char iso_tmp[PATH_MAX];
int iso_copied = 0;
FILE *fiso;
@@ -78,9 +78,9 @@
check_directory(int force)
{
char Line[LINESIZE];
- char freeldr_path[MAX_PATH];
- char iso_path[MAX_PATH];
- char compressed_7z_path[MAX_PATH];
+ char freeldr_path[PATH_MAX];
+ char iso_path[PATH_MAX];
+ char compressed_7z_path[PATH_MAX];
char *check_iso;
char *check_dir;
@@ -141,8 +141,8 @@
return 1;
}
}
- cache_name = malloc(MAX_PATH);
- tmp_name = malloc(MAX_PATH);
+ cache_name = malloc(PATH_MAX);
+ tmp_name = malloc(PATH_MAX);
strcpy(cache_name, opt_dir);
if (cleanable(opt_dir))
strcat(cache_name, ALT_PATH_STR CACHEFILE);
Modified: trunk/reactos/tools/log2lines/options.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/options.c?…
==============================================================================
--- trunk/reactos/tools/log2lines/options.c [iso-8859-1] (original)
+++ trunk/reactos/tools/log2lines/options.c [iso-8859-1] Sun Apr 14 19:49:34 2013
@@ -39,10 +39,10 @@
int opt_redo = 0; // -U
char *opt_Revision = NULL; // -R
int opt_Revision_check = 0; // -R check
-char opt_dir[MAX_PATH]; // -d <opt_dir>
-char opt_logFile[MAX_PATH]; // -l|L <opt_logFile>
+char opt_dir[PATH_MAX]; // -d <opt_dir>
+char opt_logFile[PATH_MAX]; // -l|L <opt_logFile>
char *opt_mod = NULL; // -mod for opt_logFile
-char opt_7z[MAX_PATH]; // -z <opt_7z>
+char opt_7z[PATH_MAX]; // -z <opt_7z>
char opt_scanned[LINESIZE]; // all scanned options
char opt_SourcesPath[LINESIZE]; //sources path
Modified: trunk/reactos/tools/log2lines/revision.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/revision.c…
==============================================================================
--- trunk/reactos/tools/log2lines/revision.c [iso-8859-1] (original)
+++ trunk/reactos/tools/log2lines/revision.c [iso-8859-1] Sun Apr 14 19:49:34 2013
@@ -154,8 +154,8 @@
regscan(FILE *outFile)
{
int res = 0;
- char logname[MAX_PATH];
- char inxname[MAX_PATH];
+ char logname[PATH_MAX];
+ char inxname[PATH_MAX];
char line[LINESIZE + 1];
char line2[LINESIZE + 1];
FILE *flog = NULL;
@@ -189,8 +189,8 @@
if (!res)
{
char flag[2];
- char path[MAX_PATH];
- char path2[MAX_PATH];
+ char path[PATH_MAX];
+ char path2[PATH_MAX];
int wflag = 0;
clilog(outFile, "Regression candidates:\n");
while (( pos = findRev(finx, &r) ))
@@ -257,8 +257,8 @@
updateSvnlog(void)
{
int res = 0;
- char logname[MAX_PATH];
- char inxname[MAX_PATH];
+ char logname[PATH_MAX];
+ char inxname[PATH_MAX];
char line[LINESIZE + 1];
FILE *flog = NULL;
FILE *finx = NULL;
Modified: trunk/reactos/tools/log2lines/util.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/util.c?rev…
==============================================================================
--- trunk/reactos/tools/log2lines/util.c [iso-8859-1] (original)
+++ trunk/reactos/tools/log2lines/util.c [iso-8859-1] Sun Apr 14 19:49:34 2013
@@ -95,7 +95,7 @@
rfopen(char *path, char *mode)
{
FILE *f = NULL;
- char tmppath[MAX_PATH]; // Don't modify const strings
+ char tmppath[PATH_MAX]; // Don't modify const strings
strcpy(tmppath, path);
f = fopen(tmppath, mode);