2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
14 #include <afs/param.h>
18 #include "afs_config.h"
22 * REALLOC ____________________________________________________________________
26 BOOL AfsConfigReallocFunction (LPVOID *ppTarget, size_t cbElement, size_t *pcTarget, size_t cReq, size_t cInc)
31 if (cReq <= *pcTarget)
34 if ((cNew = cInc * ((cReq + cInc-1) / cInc)) <= 0)
37 if ((pNew = (LPVOID)Allocate (cbElement * cNew)) == NULL)
39 memset (pNew, 0x00, cbElement * cNew);
43 memcpy (pNew, *ppTarget, cbElement * (*pcTarget));