Convert existing Xprintf style calls to asprintf style

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
This commit is contained in:
Alan Coopersmith 2010-11-27 20:09:04 -08:00
commit 03e8bfa1d1
12 changed files with 88 additions and 59 deletions

View file

@ -585,12 +585,11 @@ configFiles(XF86ConfFilesPtr fileconf)
else if (fileconf && fileconf->file_fontpath) {
pathFrom = X_CONFIG;
if (xf86Info.useDefaultFontPath) {
defaultFontPath = Xprintf("%s%s%s",
fileconf->file_fontpath,
*temp_path ? "," : "", temp_path);
if (defaultFontPath != NULL) {
if (asprintf(&defaultFontPath, "%s%s%s", fileconf->file_fontpath,
*temp_path ? "," : "", temp_path) == -1)
defaultFontPath = NULL;
else
must_copy = FALSE;
}
}
else
defaultFontPath = fileconf->file_fontpath;