mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-15 00:13:28 +00:00
Convert alloc+sprintf pairs into asprintf() & XNFasprintf() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
This commit is contained in:
parent
2416255f7e
commit
3a9bb93dd1
11 changed files with 36 additions and 62 deletions
|
|
@ -536,8 +536,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
|
|||
|
||||
for (i = 0; i < xf86NumScreens; i++) {
|
||||
if (xf86Screens[i]->name == NULL) {
|
||||
xf86Screens[i]->name = xnfalloc(strlen("screen") + 10 + 1);
|
||||
sprintf(xf86Screens[i]->name, "screen%d", i);
|
||||
XNFasprintf(&xf86Screens[i]->name, "screen%d", i);
|
||||
xf86MsgVerb(X_WARNING, 0,
|
||||
"Screen driver %d has no name set, using `%s'.\n",
|
||||
i, xf86Screens[i]->name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue