summaryrefslogtreecommitdiff
path: root/themes.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2008-02-15 14:57:48 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2008-02-15 14:57:48 +0100
commit9495aa9923fed16aeb6f49c69ccd249b9e17dba7 (patch)
tree5bf8b7683e3bf3b6e0725adf834b0d5344283ad3 /themes.c
parentc8584521f794492d81d87d448f2c4dcefc636b34 (diff)
downloadvdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.gz
vdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.bz2
Using cString::sprintf() instead of asprintf()
Diffstat (limited to 'themes.c')
-rw-r--r--themes.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/themes.c b/themes.c
index 21294c38..e6ee87e3 100644
--- a/themes.c
+++ b/themes.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: themes.c 1.7 2007/08/05 14:11:35 kls Exp $
+ * $Id: themes.c 1.8 2008/02/10 16:25:00 kls Exp $
*/
#include "themes.h"
@@ -285,18 +285,14 @@ void cThemes::SetThemesDirectory(const char *ThemesDirectory)
void cThemes::Load(const char *SkinName, const char *ThemeName, cTheme *Theme)
{
- char *FileName = NULL;
- asprintf(&FileName, "%s/%s-%s.theme", themesDirectory, SkinName, ThemeName);
+ cString FileName = cString::sprintf("%s/%s-%s.theme", themesDirectory, SkinName, ThemeName);
if (access(FileName, F_OK) == 0) // the file exists
Theme->Load(FileName);
- free(FileName);
}
void cThemes::Save(const char *SkinName, cTheme *Theme)
{
- char *FileName = NULL;
- asprintf(&FileName, "%s/%s-%s.theme", themesDirectory, SkinName, Theme->Name());
+ cString FileName = cString::sprintf("%s/%s-%s.theme", themesDirectory, SkinName, Theme->Name());
if (access(FileName, F_OK) != 0) // the file does not exist
Theme->Save(FileName);
- free(FileName);
}