Replace deprecated bzero with memset

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Marcin Baczyński <marbacz@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Mikhail Gusarov
2010-06-04 15:35:31 +07:00
parent f9810ba914
commit 5a0fc0ad21
32 changed files with 132 additions and 132 deletions

View File

@@ -1495,7 +1495,7 @@ RecordAllocIntervals(SetInfoPtr psi, int nIntervals)
malloc(nIntervals * sizeof(RecordSetInterval));
if (!psi->intervals)
return BadAlloc;
bzero(psi->intervals, nIntervals * sizeof(RecordSetInterval));
memset(psi->intervals, 0, nIntervals * sizeof(RecordSetInterval));
psi->size = nIntervals;
return Success;
} /* end RecordAllocIntervals */
@@ -1669,7 +1669,7 @@ RecordRegisterClients(RecordContextPtr pContext, ClientPtr client, xRecordRegist
err = BadAlloc;
goto bailout;
}
bzero(si, sizeof(SetInfoRec) * maxSets);
memset(si, 0, sizeof(SetInfoRec) * maxSets);
/* theoretically you must do this because NULL may not be all-bits-zero */
for (i = 0; i < maxSets; i++)
@@ -2053,7 +2053,7 @@ RecordAllocRanges(GetContextRangeInfoPtr pri, int nRanges)
pri->pRanges = pNewRange;
pri->size = newsize;
bzero(&pri->pRanges[pri->size - SZINCR], SZINCR * sizeof(xRecordRange));
memset(&pri->pRanges[pri->size - SZINCR], 0, SZINCR * sizeof(xRecordRange));
if (pri->nRanges < nRanges)
pri->nRanges = nRanges;
return Success;