mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[FATTEN]: static'ify a variable; do not hardcode array lengths.
svn path=/trunk/; revision=69136
This commit is contained in:
parent
d2e60268e5
commit
7f2c47b1ff
1 changed files with 4 additions and 5 deletions
|
@ -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 @@ int main(int oargc, char* oargv[])
|
|||
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 @@ int main(int oargc, char* oargv[])
|
|||
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 @@ int main(int oargc, char* oargv[])
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue