diff options
author | Tobias Grimm <tobias@e-tobi.loc> | 2009-01-08 22:04:11 +0100 |
---|---|---|
committer | Tobias Grimm <tobias@e-tobi.loc> | 2009-01-08 22:04:11 +0100 |
commit | b38bb4f0b5cf564e007c9248645482f9b0a3c1ab (patch) | |
tree | ec2b157ac594ac05af2f6d6f052213ce449967c0 | |
parent | 42d45b4f8ab0de36327aa0e9ee02bf187818b5bf (diff) | |
download | vdr-plugin-osdteletext-b38bb4f0b5cf564e007c9248645482f9b0a3c1ab.tar.gz vdr-plugin-osdteletext-b38bb4f0b5cf564e007c9248645482f9b0a3c1ab.tar.bz2 |
replaced asprintf() by cString::sprintf()
-rw-r--r-- | txtrecv.c | 6 | ||||
-rw-r--r-- | txtrecv.h | 2 |
2 files changed, 3 insertions, 5 deletions
@@ -105,7 +105,6 @@ Storage::StorageSystem Storage::system = Storage::StorageSystemPacked; Storage::Storage() { s_self=this; byteCount=0; - currentDir=0; storageOption=-1; failedFreeSpace=false; } @@ -191,9 +190,8 @@ void Storage::getFilename(char *buffer, int bufLength, PageID page) { } void Storage::prepareDirectory(tChannelID chan) { - free(currentDir); - if (asprintf(¤tDir, "%s/%s", root, *chan.ToString()) == -1 || - !MakeDirs(currentDir, 1)) { + currentDir = cString::sprintf("%s/%s", root, *chan.ToString()); + if (!MakeDirs(currentDir, 1)) { esyslog("OSD-Teletext: Error preparing directory for channel \"%s\"", *chan.ToString()); return; @@ -84,7 +84,7 @@ protected: bool exists(const char* file); long byteCount; - char *currentDir; + cString currentDir; private: static StorageSystem system; int storageOption; |