mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-31 01:34:19 +02:00
From Lucho: replace loops by fmemset/fmemcpy (43 bytes)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@938 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
b5e2616877
commit
91b3515162
@ -42,7 +42,6 @@ int SetJFTSize(UWORD nHandles)
|
|||||||
UWORD block, maxBlock;
|
UWORD block, maxBlock;
|
||||||
psp FAR *ppsp = MK_FP(cu_psp, 0);
|
psp FAR *ppsp = MK_FP(cu_psp, 0);
|
||||||
UBYTE FAR *newtab;
|
UBYTE FAR *newtab;
|
||||||
COUNT i;
|
|
||||||
|
|
||||||
if (nHandles <= ppsp->ps_maxfiles)
|
if (nHandles <= ppsp->ps_maxfiles)
|
||||||
{
|
{
|
||||||
@ -57,11 +56,8 @@ int SetJFTSize(UWORD nHandles)
|
|||||||
++block;
|
++block;
|
||||||
newtab = MK_FP(block, 0);
|
newtab = MK_FP(block, 0);
|
||||||
|
|
||||||
for (i = 0; i < ppsp->ps_maxfiles; i++)
|
fmemset(newtab, 0xff, nHandles);
|
||||||
newtab[i] = ppsp->ps_filetab[i];
|
fmemcpy(newtab, ppsp->ps_filetab, ppsp->ps_maxfiles);
|
||||||
|
|
||||||
for (; i < nHandles; i++)
|
|
||||||
newtab[i] = 0xff;
|
|
||||||
|
|
||||||
ppsp->ps_maxfiles = nHandles;
|
ppsp->ps_maxfiles = nHandles;
|
||||||
ppsp->ps_filetab = newtab;
|
ppsp->ps_filetab = newtab;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user