From 91b35151627d9bb55d87ee37b9b93272de51ffd8 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Sun, 23 May 2004 14:17:36 +0000 Subject: [PATCH] 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 --- kernel/newstuff.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/newstuff.c b/kernel/newstuff.c index f8c8064..8a54893 100644 --- a/kernel/newstuff.c +++ b/kernel/newstuff.c @@ -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;