Author: hbelusca
Date: Wed Sep 9 00:52:01 2015
New Revision: 69136
URL:
http://svn.reactos.org/svn/reactos?rev=69136&view=rev
Log:
[FATTEN]: static'ify a variable; do not hardcode array lengths.
Modified:
trunk/reactos/tools/fatten/fatten.c
Modified: trunk/reactos/tools/fatten/fatten.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/fatten/fatten.c?rev=…
==============================================================================
--- trunk/reactos/tools/fatten/fatten.c [iso-8859-1] (original)
+++ trunk/reactos/tools/fatten/fatten.c [iso-8859-1] Wed Sep 9 00:52:01 2015
@@ -11,8 +11,7 @@
#include "fatfs/ff.h"
#include "fatfs/diskio.h"
-FATFS g_Filesystem;
-
+static FATFS g_Filesystem;
static int isMounted = 0;
static char buff[32768];
@@ -277,7 +276,7 @@
goto exit;
}
- while ((rdlen = fread(buff, 1, 32768, fe)) > 0)
+ while ((rdlen = fread(buff, 1, sizeof(buff), fe)) > 0)
{
f_write(&fv, buff, rdlen, &wrlen);
}
@@ -316,7 +315,7 @@
goto exit;
}
- while ((f_read(&fe, buff, 32768, &rdlen) == 0) && (rdlen >
0))
+ while ((f_read(&fe, buff, sizeof(buff), &rdlen) == 0) &&
(rdlen > 0))
{
fwrite(buff, 1, rdlen, fv);
}
@@ -362,7 +361,7 @@
goto exit;
}
- while ((f_read(&fe, buff, 32768, &rdlen) == 0) && (rdlen >
0))
+ while ((f_read(&fe, buff, sizeof(buff), &rdlen) == 0) &&
(rdlen > 0))
{
f_write(&fv, buff, rdlen, &wrlen);
}