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:
Alan Coopersmith
2011-10-28 21:18:46 -07:00
parent e189dbb3e5
commit 6e6d732bac
13 changed files with 21 additions and 33 deletions

View File

@@ -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;
}