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
commit 6e6d732bac
13 changed files with 21 additions and 33 deletions

View file

@ -813,8 +813,7 @@ Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id,
return FALSE;
}
strncpy(path, shared->shmPath, pathmax);
path[pathmax - 1] = '\0';
strlcpy(path, shared->shmPath, pathmax);
dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, shared);