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:
Alan Coopersmith 2010-11-27 22:38:27 -08:00
commit 3a9bb93dd1
11 changed files with 36 additions and 62 deletions

View file

@ -706,11 +706,9 @@ xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec *GDev)
sparcPromClose();
}
if (promPath) {
GDev->busID = xnfalloc(strlen(promPath) + 6);
sprintf(GDev->busID, "SBUS:%s", promPath);
XNFasprintf(&GDev->busID, "SBUS:%s", promPath);
free(promPath);
} else {
GDev->busID = xnfalloc(12);
sprintf(GDev->busID, "SBUS:fb%d", sBus->fbNum);
XNFsprintf(&GDev->busID, "SBUS:fb%d", sBus->fbNum);
}
}