diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-10-13 09:11:16 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-10-13 09:11:16 +0200 |
commit | e2aee54d1279c0605a0ed5db43ce29e3079a8ad6 (patch) | |
tree | 4c99a14b3305cc2274dba371f73977957a7fe52f | |
parent | e58fa67e6c53dc8ad061a2941b9984a0c1185a8f (diff) | |
download | vdr-e2aee54d1279c0605a0ed5db43ce29e3079a8ad6.tar.gz vdr-e2aee54d1279c0605a0ed5db43ce29e3079a8ad6.tar.bz2 |
Changed a few leftover 'new char[...]' to MALLOC(char, ...)
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | recording.c | 10 |
2 files changed, 6 insertions, 5 deletions
@@ -1602,3 +1602,4 @@ Video Disk Recorder Revision History - Commands in the file 'commands.conf' can now have a '?' at the end of their title, which will result in a confirmation prompt before executing the command. +- Changed a few leftover 'new char[...]' to MALLOC(char, ...). diff --git a/recording.c b/recording.c index 544bbbdb..1be6623b 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 1.68 2002/10/05 13:44:56 kls Exp $ + * $Id: recording.c 1.69 2002/10/13 09:08:45 kls Exp $ */ #include "recording.h" @@ -363,7 +363,7 @@ cRecording::cRecording(const char *FileName) t.tm_mon--; t.tm_sec = 0; start = mktime(&t); - name = new char[p - FileName + 1]; + name = MALLOC(char, p - FileName + 1); strncpy(name, FileName, p - FileName); name[p - FileName] = 0; name = ExchangeChars(name, false); @@ -511,7 +511,7 @@ const char *cRecording::Title(char Delimiter, bool NewIndicator, int Level) break; } } - titleBuffer = new char[s - p + 3]; + titleBuffer = MALLOC(char, s - p + 3); *titleBuffer = Delimiter; *(titleBuffer + 1) = Delimiter; strn0cpy(titleBuffer + 2, p, s - p + 1); @@ -769,7 +769,7 @@ cIndexFile::cIndexFile(const char *FileName, bool Record) last = -1; index = NULL; if (FileName) { - fileName = new char[strlen(FileName) + strlen(INDEXFILESUFFIX) + 1]; + fileName = MALLOC(char, strlen(FileName) + strlen(INDEXFILESUFFIX) + 1); if (fileName) { strcpy(fileName, FileName); char *pFileExt = fileName + strlen(fileName); @@ -996,7 +996,7 @@ cFileName::cFileName(const char *FileName, bool Record, bool Blocking) record = Record; blocking = Blocking; // Prepare the file name: - fileName = new char[strlen(FileName) + RECORDFILESUFFIXLEN]; + fileName = MALLOC(char, strlen(FileName) + RECORDFILESUFFIXLEN); if (!fileName) { esyslog("ERROR: can't copy file name '%s'", fileName); return; |