diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-15 14:57:48 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-15 14:57:48 +0100 |
commit | 9495aa9923fed16aeb6f49c69ccd249b9e17dba7 (patch) | |
tree | 5bf8b7683e3bf3b6e0725adf834b0d5344283ad3 /themes.c | |
parent | c8584521f794492d81d87d448f2c4dcefc636b34 (diff) | |
download | vdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.gz vdr-9495aa9923fed16aeb6f49c69ccd249b9e17dba7.tar.bz2 |
Using cString::sprintf() instead of asprintf()
Diffstat (limited to 'themes.c')
-rw-r--r-- | themes.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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); } |