Convert strncpy/strncat to strlcpy/strlcat
As long as we're carrying around a compatibility copy in os/strl*.c, might as well use them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
@@ -777,14 +777,12 @@ xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name,
|
||||
int patchLevel)
|
||||
{
|
||||
XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
|
||||
strncpy(pScreenPriv->clientDriverName, name,
|
||||
strlcpy(pScreenPriv->clientDriverName, name,
|
||||
DR_CLIENT_DRIVER_NAME_SIZE);
|
||||
strncpy(pScreenPriv->busID, busID, DR_BUSID_SIZE);
|
||||
strlcpy(pScreenPriv->busID, busID, DR_BUSID_SIZE);
|
||||
pScreenPriv->major = major;
|
||||
pScreenPriv->minor = minor;
|
||||
pScreenPriv->patchLevel = patchLevel;
|
||||
pScreenPriv->clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE-1] = 0;
|
||||
pScreenPriv->busID[DR_BUSID_SIZE-1] = 0;
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user