mirror of https://github.com/FDOS/kernel.git
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;
|
||||
psp FAR *ppsp = MK_FP(cu_psp, 0);
|
||||
UBYTE FAR *newtab;
|
||||
COUNT i;
|
||||
|
||||
if (nHandles <= ppsp->ps_maxfiles)
|
||||
{
|
||||
|
@ -57,11 +56,8 @@ int SetJFTSize(UWORD nHandles)
|
|||
++block;
|
||||
newtab = MK_FP(block, 0);
|
||||
|
||||
for (i = 0; i < ppsp->ps_maxfiles; i++)
|
||||
newtab[i] = ppsp->ps_filetab[i];
|
||||
|
||||
for (; i < nHandles; i++)
|
||||
newtab[i] = 0xff;
|
||||
fmemset(newtab, 0xff, nHandles);
|
||||
fmemcpy(newtab, ppsp->ps_filetab, ppsp->ps_maxfiles);
|
||||
|
||||
ppsp->ps_maxfiles = nHandles;
|
||||
ppsp->ps_filetab = newtab;
|
||||
|
|
Loading…
Reference in New Issue