summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/configfile.c2
-rw-r--r--src/xine-engine/load_plugins.c16
-rw-r--r--src/xine-engine/osd.c2
-rw-r--r--src/xine-engine/xine.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index 507f0a81d..ca82c7b9e 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -371,7 +371,7 @@ static const char *config_translate_key (const char *key, char **tmp) {
*tmp = NULL;
if (!strncmp (key, "decoder.", 8) &&
!strcmp (key + (trans = strlen (key)) - 9, "_priority")) {
- asprintf (tmp, "engine.decoder_priorities.%.*s", trans - 17, key + 8);
+ *tmp = _x_asprintf ("engine.decoder_priorities.%.*s", trans - 17, key + 8);
return *tmp;
}
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 9eb33f8ed..0080bc30c 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -381,7 +381,7 @@ static void _insert_node (xine_t *this,
* does not strdup() it, so we have to provide a different pointer
* for each decoder */
for (i = 0; catalog->prio_desc[i]; i++);
- asprintf(&catalog->prio_desc[i], _("priority for %s decoder"), info->id);
+ catalog->prio_desc[i] = _x_asprintf(_("priority for %s decoder"), info->id);
this->config->register_num (this->config,
key,
0,
@@ -1068,11 +1068,11 @@ static void save_catalog (xine_t *this) {
const char *const homedir = xine_get_homedir();
- asprintf(&cachefile, "%s/%s", homedir, relname);
- asprintf(&cachefile_new, "%s.new", cachefile);
+ cachefile = _x_asprintf("%s/%s", homedir, relname);
+ cachefile_new = _x_asprintf("%s.new", cachefile);
/* make sure homedir (~/.xine) exists */
- asprintf(&dirfile, "%s/%s", homedir, dirname);
+ dirfile = _x_asprintf("%s/%s", homedir, dirname);
mkdir (dirfile, 0755);
free (dirfile);
@@ -1119,7 +1119,7 @@ static void load_cached_catalog (xine_t *this) {
char *cachefile;
const char *relname = CACHE_CATALOG_FILE;
- asprintf(&cachefile, "%s/%s", xine_get_homedir(), relname);
+ cachefile = _x_asprintf("%s/%s", xine_get_homedir(), relname);
if( (fp = fopen(cachefile,"r")) != NULL ) {
load_plugin_list (fp, this->plugin_catalog->cache_list);
@@ -1175,7 +1175,7 @@ void _x_scan_plugins (xine_t *this) {
} else
len = strlen(q);
if (q[0] == '~' && q[1] == '/')
- asprintf (&dir, "%s%.*s", homedir, (int)(len - 1), q + 1);
+ dir = _x_asprintf ("%s%.*s", homedir, (int)(len - 1), q + 1);
else
dir = strndup (q, len);
push_if_dir (plugindirs, dir); /* store or free it */
@@ -1183,11 +1183,11 @@ void _x_scan_plugins (xine_t *this) {
} else {
char *dir;
int i;
- asprintf (&dir, "%s/.xine/plugins", homedir);
+ dir = _x_asprintf ("%s/.xine/plugins", homedir);
push_if_dir (plugindirs, dir);
for (i = 0; i <= XINE_LT_AGE; ++i)
{
- asprintf (&dir, "%s.%d", XINE_PLUGINROOT, XINE_LT_AGE - i);
+ dir = _x_asprintf ("%s.%d", XINE_PLUGINROOT, XINE_LT_AGE - i);
push_if_dir (plugindirs, dir);
}
}
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index 94fc969bd..32e5e36fd 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -1426,7 +1426,7 @@ static void osd_preload_fonts (osd_renderer_t *this, char *path) {
lprintf("font '%s' size %d is preloaded\n",
font->name, font->size);
- asprintf (&font->filename, "%s/%s", path, entry->d_name);
+ font->filename = _x_asprintf ("%s/%s", path, entry->d_name);
font->next = this->fonts;
this->fonts = font;
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 78d144b1f..b95a14292 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -1672,7 +1672,7 @@ static void config_save_cb (void *this_gen, xine_cfg_entry_t *entry) {
xine_t *this = (xine_t *)this_gen;
char *homedir_trail_slash;
- asprintf(&homedir_trail_slash, "%s/", xine_get_homedir());
+ homedir_trail_slash = _x_asprintf("%s/", xine_get_homedir());
if (entry->str_value[0] &&
(entry->str_value[0] != '/' || strstr(entry->str_value, "/.") ||
strcmp(entry->str_value, xine_get_homedir()) == 0 ||