mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user