Remove unnecessary type parameter from DELETE macro.

This commit is contained in:
Antti Seppälä 2007-10-22 19:32:19 +00:00
parent eb1cd9b01a
commit 13fa932a5a
2 changed files with 16 additions and 16 deletions

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: common.h,v 1.14 2007/10/22 16:22:11 rahrenbe Exp $
* $Id: common.h,v 1.15 2007/10/22 19:32:19 ajhseppa Exp $
*/
#ifndef __IPTV_COMMON_H
@ -44,13 +44,13 @@
#define ERROR_IF(exp, errstr) ERROR_IF_FUNC(exp, errstr, , );
#define DELETE_POINTER(ptr, type) \
do { \
if (ptr) { \
type *tmp = ptr; \
ptr = NULL; \
delete(tmp); \
} \
#define DELETE_POINTER(ptr) \
do { \
if (ptr) { \
typeof(*ptr) *tmp = ptr; \
ptr = NULL; \
delete(tmp); \
} \
} while (0)
uint16_t ts_pid(const uint8_t *buf);

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: device.c,v 1.73 2007/10/22 16:22:11 rahrenbe Exp $
* $Id: device.c,v 1.74 2007/10/22 19:32:19 ajhseppa Exp $
*/
#include "config.h"
@ -45,16 +45,16 @@ cIptvDevice::cIptvDevice(unsigned int Index)
cIptvDevice::~cIptvDevice()
{
debug("cIptvDevice::~cIptvDevice(%d)\n", deviceIndex);
DELETE_POINTER(pIptvStreamer, cIptvStreamer);
DELETE_POINTER(pUdpProtocol, cIptvProtocolUdp);
DELETE_POINTER(pHttpProtocol, cIptvProtocolHttp);
DELETE_POINTER(pFileProtocol, cIptvProtocolFile);
DELETE_POINTER(pExtProtocol, cIptvProtocolExt);
DELETE_POINTER(tsBuffer, cRingBufferLinear);
DELETE_POINTER(pIptvStreamer);
DELETE_POINTER(pUdpProtocol);
DELETE_POINTER(pHttpProtocol);
DELETE_POINTER(pFileProtocol);
DELETE_POINTER(pExtProtocol);
DELETE_POINTER(tsBuffer);
// Detach and destroy sid filter
if (pSidScanner) {
Detach(pSidScanner);
DELETE_POINTER(pSidScanner, cSidScanner);
DELETE_POINTER(pSidScanner);
}
// Destroy all filters
for (int i = 0; i < eMaxSecFilterCount; ++i)