diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-08-11 13:32:23 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-08-11 13:32:23 +0200 |
commit | 9a1a16f3d42b2f48b26eb3daef3a195fc0f2a13e (patch) | |
tree | 7d7d8667832651e37cd8de53296d0bcd32dba085 /videodir.c | |
parent | b9c4cb0ec9c417c483be2a40cd66f839b063015f (diff) | |
download | vdr-9a1a16f3d42b2f48b26eb3daef3a195fc0f2a13e.tar.gz vdr-9a1a16f3d42b2f48b26eb3daef3a195fc0f2a13e.tar.bz2 |
Consistently using malloc/free and new/delete
Diffstat (limited to 'videodir.c')
-rw-r--r-- | videodir.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: videodir.c 1.8 2002/05/13 16:32:52 kls Exp $ + * $Id: videodir.c 1.9 2002/08/11 13:31:02 kls Exp $ */ #include "videodir.h" @@ -48,9 +48,9 @@ cVideoDirectory::cVideoDirectory(void) cVideoDirectory::~cVideoDirectory() { - delete name; - delete stored; - delete adjusted; + free(name); + free(stored); + free(adjusted); } int cVideoDirectory::FreeMB(int *UsedMB) @@ -87,7 +87,7 @@ bool cVideoDirectory::Next(void) void cVideoDirectory::Store(void) { if (name) { - delete stored; + free(stored); stored = strdup(name); } } @@ -95,7 +95,7 @@ void cVideoDirectory::Store(void) const char *cVideoDirectory::Adjust(const char *FileName) { if (stored) { - delete adjusted; + free(adjusted); adjusted = strdup(FileName); return strncpy(adjusted, stored, length); } @@ -139,7 +139,7 @@ int OpenVideoFile(const char *FileName, int Flags) } int Result = open(ActualFileName, Flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (ActualFileName != FileName) - delete ActualFileName; + free((char *)ActualFileName); return Result; } |