You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/05/23 17:28:17 UTC
[3/3] git commit: TS-2547 Remove Resources.c/h, and NEW as well
TS-2547 Remove Resources.c/h, and NEW as well
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/7353f669
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7353f669
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7353f669
Branch: refs/heads/master
Commit: 7353f6690f6072845fe5fa44344d3b05b4ed33dc
Parents: 128ca2e
Author: Leif Hedstrom <zw...@apache.org>
Authored: Thu May 22 12:52:58 2014 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri May 23 08:57:35 2014 -0600
----------------------------------------------------------------------
CHANGES | 2 +
iocore/aio/test_AIO.cc | 2 +-
iocore/cache/Cache.cc | 24 +-
iocore/cache/CacheDir.cc | 2 +-
iocore/cache/CacheDisk.cc | 10 +-
iocore/cache/CacheHosting.cc | 16 +-
iocore/cache/CachePages.cc | 4 +-
iocore/cache/CachePagesInternal.cc | 2 +-
iocore/cache/P_CacheArray.h | 6 +-
iocore/cache/P_CacheHosting.h | 2 +-
iocore/cache/Store.cc | 14 +-
iocore/cluster/ClusterAPI.cc | 10 +-
iocore/cluster/ClusterCache.cc | 4 +-
iocore/cluster/ClusterConfig.cc | 10 +-
iocore/cluster/ClusterHandlerBase.cc | 8 +-
iocore/cluster/ClusterMachine.cc | 4 +-
iocore/cluster/ClusterProcessor.cc | 12 +-
iocore/cluster/test_I_Cluster.cc | 2 +-
iocore/cluster/test_P_Cluster.cc | 2 +-
iocore/dns/DNS.cc | 4 +-
iocore/dns/SplitDNS.cc | 6 +-
iocore/dns/test_I_DNS.cc | 2 +-
iocore/dns/test_P_DNS.cc | 4 +-
iocore/eventsystem/IOBuffer.cc | 2 +-
iocore/eventsystem/P_Freer.h | 8 +-
iocore/eventsystem/UnixEventProcessor.cc | 6 +-
iocore/eventsystem/test_Buffer.cc | 2 +-
iocore/eventsystem/test_Event.cc | 2 +-
iocore/hostdb/HostDB.cc | 10 +-
iocore/hostdb/MultiCache.cc | 10 +-
iocore/hostdb/P_HostDBProcessor.h | 2 +-
iocore/hostdb/P_MultiCache.h | 2 +-
iocore/hostdb/test_I_HostDB.cc | 6 +-
iocore/hostdb/test_P_HostDB.cc | 4 +-
iocore/net/NetTest-http-server.c | 7 +-
iocore/net/P_UnixUDPConnection.h | 2 +-
iocore/net/SSLCertLookup.cc | 2 +-
iocore/net/SSLConfig.cc | 6 +-
iocore/net/SSLNetAccept.cc | 2 +-
iocore/net/SSLNetProcessor.cc | 2 +-
iocore/net/SSLNextProtocolAccept.cc | 2 +-
iocore/net/SSLNextProtocolSet.cc | 2 +-
iocore/net/SSLUtils.cc | 2 +-
iocore/net/SessionAccept.cc | 4 +-
iocore/net/UnixNet.cc | 6 +-
iocore/net/UnixNetAccept.cc | 2 +-
iocore/net/UnixNetPages.cc | 2 +-
iocore/net/UnixNetProcessor.cc | 8 +-
iocore/net/UnixNetVConnection.cc | 4 +-
iocore/net/UnixUDPNet.cc | 4 +-
iocore/net/test_I_Net.cc | 2 +-
iocore/net/test_I_UDPNet.cc | 2 +-
iocore/net/test_P_Net.cc | 8 +-
iocore/net/test_P_UDPNet.cc | 2 +-
iocore/utils/diags.i | 2 +-
lib/records/RecLocal.cc | 2 +-
lib/records/RecProcess.cc | 8 +-
lib/records/test_I_RecLocal.cc | 2 +-
lib/records/test_RecProcess.i | 2 +-
lib/ts/Compatability.h | 2 -
lib/ts/Diags.cc | 3 +-
lib/ts/DynArray.h | 6 +-
lib/ts/HostLookup.cc | 14 +-
lib/ts/Layout.cc | 2 +-
lib/ts/Makefile.am | 2 -
lib/ts/ParseRules.h | 16 -
lib/ts/Resource.cc | 68 ----
lib/ts/Resource.h | 65 ---
lib/ts/ink_memory.h | 1 +
lib/ts/libts.h | 1 -
lib/ts/llqueue.cc | 1 +
mgmt/Main.cc | 8 +-
mgmt/ProxyConfig.cc | 4 +-
mgmt/ProxyConfig.h | 2 +-
mgmt/api/EventCallback.cc | 1 +
mgmt/api/GenericParser.cc | 56 +--
mgmt/api/NetworkUtilsRemote.cc | 1 +
mgmt/cluster/ClusterCom.cc | 7 +-
mgmt/stats/StatProcessor.cc | 2 +-
mgmt/stats/StatType.cc | 16 +-
mgmt/utils/MgmtHashTable.h | 2 +-
mgmt/web2/WebHttpContext.cc | 10 +-
proxy/AbstractBuffer.cc | 2 +-
proxy/CacheControl.cc | 8 +-
proxy/ControlMatcher.cc | 26 +-
proxy/ICP.cc | 30 +-
proxy/ICPConfig.cc | 18 +-
proxy/IPAllow.cc | 4 +-
proxy/InkAPI.cc | 44 +-
proxy/InkIOCoreAPI.cc | 4 +-
proxy/Main.cc | 20 +-
proxy/ParentSelection.cc | 16 +-
proxy/PluginVC.cc | 8 +-
proxy/Prefetch.cc | 16 +-
proxy/ProtocolProbeSessionAccept.cc | 2 +-
proxy/ReverseProxy.cc | 6 +-
proxy/SocksProxy.cc | 2 +-
proxy/StatSystem.cc | 4 +-
proxy/Transform.cc | 8 +-
proxy/Update.cc | 34 +-
proxy/congest/Congestion.cc | 4 +-
proxy/hdrs/HdrTest.cc | 5 +-
proxy/hdrs/HdrToken.cc | 2 +-
proxy/hdrs/MIME.cc | 4 +-
proxy/hdrs/test_header.cc | 3 +-
proxy/hdrs/test_urlhash.cc | 1 -
proxy/http/HttpBodyFactory.cc | 8 +-
proxy/http/HttpConfig.cc | 8 +-
proxy/http/HttpPages.cc | 2 +-
proxy/http/HttpProxyServerMain.cc | 19 +-
proxy/http/HttpSM.cc | 2 +-
proxy/http/HttpSM.h | 2 +-
proxy/http/HttpSessionManager.cc | 2 +-
proxy/http/HttpUpdateTester.cc | 2 +-
proxy/http/remap/RemapConfig.cc | 14 +-
proxy/http/remap/UrlMapping.cc | 2 +-
proxy/logging/Log.cc | 551 +++++++++++++-------------
proxy/logging/LogBuffer.cc | 6 +-
proxy/logging/LogCollationAccept.cc | 2 +-
proxy/logging/LogCollationClientSM.cc | 2 +-
proxy/logging/LogCollationHostSM.cc | 2 +-
proxy/logging/LogConfig.cc | 63 ++-
proxy/logging/LogField.cc | 3 +-
proxy/logging/LogFilter.cc | 19 +-
proxy/logging/LogFormat.cc | 10 +-
proxy/logging/LogFormat.h | 5 +-
proxy/logging/LogHost.cc | 9 +-
proxy/logging/LogObject.cc | 24 +-
proxy/logging/LogPredefined.cc | 18 +-
proxy/logging/LogSock.cc | 6 +-
proxy/logging/LogStandalone.cc | 6 +-
proxy/logstats.cc | 6 +-
proxy/sac.cc | 2 +-
proxy/shared/DiagsConfig.cc | 4 +-
proxy/shared/InkXml.cc | 6 +-
proxy/shared/InkXml.h | 11 +-
136 files changed, 752 insertions(+), 918 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index ac63332..233b9d3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 5.0.0
+ *) [TS-2547] Remove Resource.c/h, and NEW as well.
+
*) [TS-1588] slow log should include client addr
*) [TS-2728] The lib/perl Makefile.am does not properly detect in-source
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/aio/test_AIO.cc
----------------------------------------------------------------------
diff --git a/iocore/aio/test_AIO.cc b/iocore/aio/test_AIO.cc
index bc1c6d4..a275fb6 100644
--- a/iocore/aio/test_AIO.cc
+++ b/iocore/aio/test_AIO.cc
@@ -118,7 +118,7 @@ init_diags(const char *bdt, const char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
Warning("couldn't open diags log file '%s', " "will not log to this file", diags_logpath);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index e5ae121..03db89c 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -647,7 +647,7 @@ CacheProcessor::start_internal(int flags)
}
}
if (diskok) {
- CacheDisk *disk = NEW(new CacheDisk());
+ CacheDisk *disk = new CacheDisk();
Debug("cache_hosting", "interim Disk: %d, blocks: %d", gn_interim_disks, blocks);
int sector_size = sd->hw_sector_size;
if (sector_size < cache_config_force_sector_size)
@@ -731,7 +731,7 @@ CacheProcessor::start_internal(int flags)
}
}
if (diskok) {
- gdisks[gndisks] = NEW(new CacheDisk());
+ gdisks[gndisks] = new CacheDisk();
gdisks[gndisks]->forced_volume_num = sd->vol_num;
Debug("cache_hosting", "Disk: %d, blocks: %d", gndisks, blocks);
int sector_size = sd->hw_sector_size;
@@ -745,7 +745,7 @@ CacheProcessor::start_internal(int flags)
off_t skip = ROUND_TO_STORE_BLOCK((sd->offset < START_POS ? START_POS + sd->alignment : sd->offset));
blocks = blocks - (skip >> STORE_BLOCK_SHIFT);
#if AIO_MODE == AIO_MODE_NATIVE
- eventProcessor.schedule_imm(NEW(new DiskInit(gdisks[gndisks], path, blocks, skip, sector_size, fd, clear)));
+ eventProcessor.schedule_imm(new DiskInit(gdisks[gndisks], path, blocks, skip, sector_size, fd, clear));
#else
gdisks[gndisks]->open(path, blocks, skip, sector_size, fd, clear);
#endif
@@ -853,19 +853,19 @@ CacheProcessor::diskInitialized()
d->sync();
}
if (config_volumes.num_volumes == 0) {
- theCache = NEW(new Cache());
+ theCache = new Cache();
theCache->scheme = CACHE_HTTP_TYPE;
theCache->open(clear, fix);
return;
}
if (config_volumes.num_http_volumes != 0) {
- theCache = NEW(new Cache());
+ theCache = new Cache();
theCache->scheme = CACHE_HTTP_TYPE;
theCache->open(clear, fix);
}
if (config_volumes.num_stream_volumes != 0) {
- theStreamCache = NEW(new Cache());
+ theStreamCache = new Cache();
theStreamCache->scheme = CACHE_RTSP_TYPE;
theStreamCache->open(clear, fix);
}
@@ -2241,7 +2241,7 @@ Cache::open_done() {
return 0;
}
- hosttable = NEW(new CacheHostTable(this, scheme));
+ hosttable = new CacheHostTable(this, scheme);
hosttable->register_config_callback(&hosttable);
if (hosttable->gen_host_rec.num_cachevols == 0)
@@ -2275,7 +2275,7 @@ Cache::open(bool clear, bool /* fix ATS_UNUSED */) {
if (cp->disk_vols[i] && !DISK_BAD(cp->disk_vols[i]->disk)) {
DiskVolBlockQueue *q = cp->disk_vols[i]->dpb_queue.head;
for (; q; q = q->link.next) {
- cp->vols[vol_no] = NEW(new Vol());
+ cp->vols[vol_no] = new Vol();
CacheDisk *d = cp->disk_vols[i]->disk;
cp->vols[vol_no]->disk = d;
cp->vols[vol_no]->fd = d->fd;
@@ -2285,7 +2285,7 @@ Cache::open(bool clear, bool /* fix ATS_UNUSED */) {
bool vol_clear = clear || d->cleared || q->new_block;
#if AIO_MODE == AIO_MODE_NATIVE
- eventProcessor.schedule_imm(NEW(new VolInit(cp->vols[vol_no], d->path, blocks, q->b->offset, vol_clear)));
+ eventProcessor.schedule_imm(new VolInit(cp->vols[vol_no], d->path, blocks, q->b->offset, vol_clear));
#else
cp->vols[vol_no]->init(d->path, blocks, q->b->offset, vol_clear);
#endif
@@ -2820,7 +2820,7 @@ cplist_init()
if (!p) {
// did not find a volume in the cache vol list...create
// a new one
- CacheVol *new_p = NEW(new CacheVol());
+ CacheVol *new_p = new CacheVol();
new_p->vol_number = dp[j]->vol_number;
new_p->num_vols = dp[j]->num_volblocks;
new_p->size = dp[j]->size;
@@ -2940,7 +2940,7 @@ cplist_reconfigure()
gnvol = 0;
if (config_volumes.num_volumes == 0) {
/* only the http cache */
- CacheVol *cp = NEW(new CacheVol());
+ CacheVol *cp = new CacheVol();
cp->vol_number = 0;
cp->scheme = CACHE_HTTP_TYPE;
cp->disk_vols = (DiskVol **)ats_malloc(gndisks * sizeof(DiskVol *));
@@ -3046,7 +3046,7 @@ cplist_reconfigure()
if (!config_vol->cachep) {
// we did not find a corresponding entry in cache vol...creat one
- CacheVol *new_cp = NEW(new CacheVol());
+ CacheVol *new_cp = new CacheVol();
new_cp->disk_vols = (DiskVol **)ats_malloc(gndisks * sizeof(DiskVol *));
memset(new_cp->disk_vols, 0, gndisks * sizeof(DiskVol *));
if (create_volume(config_vol->number, size_in_blocks, config_vol->scheme, new_cp))
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/CacheDir.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc
index d5e7739..98c3a37 100644
--- a/iocore/cache/CacheDir.cc
+++ b/iocore/cache/CacheDir.cc
@@ -951,7 +951,7 @@ dir_lookaside_remove(CacheKey *key, Vol *d)
void
dir_sync_init()
{
- cacheDirSync = NEW(new CacheSync);
+ cacheDirSync = new CacheSync;
cacheDirSync->trigger = eventProcessor.schedule_in(cacheDirSync, HRTIME_SECONDS(cache_config_dir_sync_frequency));
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/CacheDisk.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheDisk.cc b/iocore/cache/CacheDisk.cc
index b61fec7..7edc4c2 100644
--- a/iocore/cache/CacheDisk.cc
+++ b/iocore/cache/CacheDisk.cc
@@ -243,7 +243,7 @@ CacheDisk::create_volume(int number, off_t size_in_blocks, int scheme)
dpb->len -= size_in_blocks;
dpb->offset += ((off_t) size_in_blocks * STORE_BLOCK_SIZE);
- DiskVolBlockQueue *new_q = NEW(new DiskVolBlockQueue());
+ DiskVolBlockQueue *new_q = new DiskVolBlockQueue();
new_q->b = dpb;
free_blocks->dpb_queue.enqueue(new_q);
free_blocks->size += dpb->len;
@@ -269,7 +269,7 @@ CacheDisk::create_volume(int number, off_t size_in_blocks, int scheme)
}
}
if (i == header->num_volumes) {
- disk_vols[i] = NEW(new DiskVol());
+ disk_vols[i] = new DiskVol();
disk_vols[i]->num_volblocks = 1;
disk_vols[i]->vol_number = number;
disk_vols[i]->disk = this;
@@ -328,7 +328,7 @@ CacheDisk::update_header()
}
delete free_blocks;
}
- free_blocks = NEW(new DiskVol());
+ free_blocks = new DiskVol();
free_blocks->vol_number = -1;
free_blocks->disk = this;
free_blocks->num_volblocks = 0;
@@ -336,7 +336,7 @@ CacheDisk::update_header()
free_space = 0;
for (i = 0; i < header->num_diskvol_blks; i++) {
- DiskVolBlockQueue *dpbq = NEW(new DiskVolBlockQueue());
+ DiskVolBlockQueue *dpbq = new DiskVolBlockQueue();
bool dpbq_referenced = false;
dpbq->b = &header->vol_info[i];
if (header->vol_info[i].free) {
@@ -360,7 +360,7 @@ CacheDisk::update_header()
if (j == n) {
// did not find a matching volume number. create a new
// one
- disk_vols[j] = NEW(new DiskVol());
+ disk_vols[j] = new DiskVol();
disk_vols[j]->vol_number = vol_number;
disk_vols[j]->disk = this;
disk_vols[j]->num_volblocks = 1;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/CacheHosting.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheHosting.cc b/iocore/cache/CacheHosting.cc
index e3c07e3..dabbef6 100644
--- a/iocore/cache/CacheHosting.cc
+++ b/iocore/cache/CacheHosting.cc
@@ -43,7 +43,7 @@ array_len(-1),
num_el(-1),
type(typ)
{
- host_lookup = NEW(new HostLookup(name));
+ host_lookup = new HostLookup(name);
}
CacheHostMatcher::~CacheHostMatcher()
@@ -92,7 +92,7 @@ CacheHostMatcher::AllocateSpace(int num_entries)
host_lookup->AllocateSpace(num_entries);
- data_array = NEW(new CacheHostRecord[num_entries]);
+ data_array = new CacheHostRecord[num_entries];
array_len = num_entries;
num_el = 0;
@@ -247,7 +247,7 @@ CacheHostTable::config_callback(const char * /* name ATS_UNUSED */, RecDataT /*
RecData /* data ATS_UNUSED */, void *cookie)
{
CacheHostTable **ppt = (CacheHostTable **) cookie;
- eventProcessor.schedule_imm(NEW(new CacheHostTableConfig(ppt)));
+ eventProcessor.schedule_imm(new CacheHostTableConfig(ppt));
return 0;
}
@@ -351,7 +351,7 @@ CacheHostTable::BuildTableFromString(const char * config_file_path, char *file_b
}
if (hostDomain > 0) {
- hostMatch = NEW(new CacheHostMatcher(matcher_name, type));
+ hostMatch = new CacheHostMatcher(matcher_name, type);
hostMatch->AllocateSpace(hostDomain);
}
// Traverse the list and build the records table
@@ -697,7 +697,7 @@ ConfigVolumes::BuildListFromString(char *config_file_path, char *file_buf)
if (!(*tmp) && state == DONE) {
/* add the config */
- ConfigVol *configp = NEW(new ConfigVol());
+ ConfigVol *configp = new ConfigVol();
configp->number = volume_number;
if (in_percent) {
configp->percent = size;
@@ -921,7 +921,7 @@ create_config(RegressionTest * t, int num)
for (; blocks >= STORE_BLOCKS_PER_VOL; blocks -= STORE_BLOCKS_PER_VOL) {
if (vol_num > 255)
break;
- ConfigVol *cp = NEW(new ConfigVol());
+ ConfigVol *cp = new ConfigVol();
cp->number = vol_num++;
cp->scheme = CACHE_HTTP_TYPE;
cp->size = 128;
@@ -962,7 +962,7 @@ create_config(RegressionTest * t, int num)
vol_num = 1;
rprintf(t, "Cleared disk\n");
for (i = 0; i < 10; i++) {
- ConfigVol *cp = NEW(new ConfigVol());
+ ConfigVol *cp = new ConfigVol();
cp->number = vol_num++;
cp->scheme = CACHE_HTTP_TYPE;
cp->size = 10;
@@ -1021,7 +1021,7 @@ create_config(RegressionTest * t, int num)
ink_assert(blocks <= (int) total_space);
total_space -= blocks;
- ConfigVol *cp = NEW(new ConfigVol());
+ ConfigVol *cp = new ConfigVol();
cp->number = vol_num++;
cp->scheme = scheme;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/CachePages.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CachePages.cc b/iocore/cache/CachePages.cc
index 08ef4b7..2f0e57a 100644
--- a/iocore/cache/CachePages.cc
+++ b/iocore/cache/CachePages.cc
@@ -111,7 +111,7 @@ struct ShowCache: public ShowCont {
}
}
// initialize url array
- show_cache_urlstrs = NEW(new char[nstrings + 1][500]);
+ show_cache_urlstrs = new char[nstrings + 1][500];
memset(show_cache_urlstrs, '\0', (nstrings + 1) * 500 * sizeof (char));
char *q, *t;
@@ -161,7 +161,7 @@ struct ShowCache: public ShowCont {
Action *
register_ShowCache(Continuation *c, HTTPHdr *h) {
- ShowCache * theshowcache = NEW(new ShowCache(c, h));
+ ShowCache * theshowcache = new ShowCache(c, h);
URL *u = h->url_get();
int path_len;
const char *path = u->path_get(&path_len);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/CachePagesInternal.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CachePagesInternal.cc b/iocore/cache/CachePagesInternal.cc
index adde166..316b499 100644
--- a/iocore/cache/CachePagesInternal.cc
+++ b/iocore/cache/CachePagesInternal.cc
@@ -77,7 +77,7 @@ ShowCacheInternal *theshowcacheInternal = NULL;
Action *
register_ShowCacheInternal(Continuation * c, HTTPHdr * h)
{
- theshowcacheInternal = NEW(new ShowCacheInternal(c, h));
+ theshowcacheInternal = new ShowCacheInternal(c, h);
URL *u = h->url_get();
int path_len;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/P_CacheArray.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheArray.h b/iocore/cache/P_CacheArray.h
index fb4adce..681290a 100644
--- a/iocore/cache/P_CacheArray.h
+++ b/iocore/cache/P_CacheArray.h
@@ -24,10 +24,6 @@
#ifndef __CACHE_ARRAY_H__
#define __CACHE_ARRAY_H__
-
-#include "Resource.h"
-
-
#define FAST_DATA_SIZE 4
@@ -159,7 +155,7 @@ template<class T> TS_INLINE void CacheArray<T>::resize(int new_size)
int i;
if (new_size > FAST_DATA_SIZE) {
- new_data = NEW(new T[new_size]);
+ new_data = new T[new_size];
} else {
new_data = fast_data;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/P_CacheHosting.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheHosting.h b/iocore/cache/P_CacheHosting.h
index dc7008a..5d1e793 100644
--- a/iocore/cache/P_CacheHosting.h
+++ b/iocore/cache/P_CacheHosting.h
@@ -146,7 +146,7 @@ struct CacheHostTableConfig: public Continuation
{
(void) e;
(void) event;
- CacheHostTable *t = NEW(new CacheHostTable((*ppt)->cache, (*ppt)->type));
+ CacheHostTable *t = new CacheHostTable((*ppt)->cache, (*ppt)->type);
CacheHostTable *old = (CacheHostTable *) ink_atomic_swap(&t, *ppt);
new_Deleter(old, CACHE_MEM_FREE_TIMEOUT);
return EVENT_DONE;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cache/Store.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Store.cc b/iocore/cache/Store.cc
index 46c346c..023be6a 100644
--- a/iocore/cache/Store.cc
+++ b/iocore/cache/Store.cc
@@ -343,9 +343,9 @@ Store::read_config(int fd)
n[len] = 0;
char *pp = Layout::get()->relative(n);
- ns = NEW(new Span);
+ ns = new Span;
ns->vol_num = volume_id;
- Debug("cache_init", "Store::read_config - ns = NEW (new Span); ns->init(\"%s\",%" PRId64 "), ns->vol_num=%d",
+ Debug("cache_init", "Store::read_config - ns = new Span; ns->init(\"%s\",%" PRId64 "), ns->vol_num=%d",
pp, size, ns->vol_num);
if ((err = ns->init(pp, size))) {
char buf[4096];
@@ -409,7 +409,7 @@ Store::read_interim_config() {
char *e = strpbrk(n, " \t\n");
len = e ? e - n : strlen(n);
n[len] = '\0';
- ns = NEW(new Span);
+ ns = new Span;
if ((err = ns->init(n, -1))) {
char buf[4096];
snprintf(buf, sizeof(buf), "could not initialize storage \"%s\" [%s]", n,
@@ -850,7 +850,7 @@ try_alloc(Store & target, Span * source, unsigned int start_blocks, bool one_onl
a = source->blocks;
else
a = blocks;
- Span *d = NEW(new Span(*source));
+ Span *d = new Span(*source);
d->pathname = ats_strdup(source->pathname);
d->blocks = a;
@@ -926,7 +926,7 @@ Store::try_realloc(Store & s, Store & diff)
d->offset += sd->blocks;
goto Lfound;
} else {
- Span *x = NEW(new Span(*d));
+ Span *x = new Span(*d);
x->pathname = ats_strdup(x->pathname);
// d will be the first vol
d->blocks = sd->offset - d->offset;
@@ -1125,7 +1125,7 @@ Store::read(int fd, char *aname)
Span *sd = NULL;
while (n--) {
Span *last = sd;
- sd = NEW(new Span);
+ sd = new Span;
if (!last)
disk[i] = sd;
@@ -1147,7 +1147,7 @@ Lbail:
Span *
Span::dup()
{
- Span *ds = NEW(new Span(*this));
+ Span *ds = new Span(*this);
ds->pathname = ats_strdup(pathname);
if (ds->link.next)
ds->link.next = ds->link.next->dup();
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cluster/ClusterAPI.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterAPI.cc b/iocore/cluster/ClusterAPI.cc
index 3600022..9a9ddaa 100644
--- a/iocore/cluster/ClusterAPI.cc
+++ b/iocore/cluster/ClusterAPI.cc
@@ -282,7 +282,7 @@ clusterAPI_init()
ClusterAPI_mutex = new_ProxyMutex();
MUTEX_TRY_LOCK(lock, ClusterAPI_mutex, this_ethread());
ink_release_assert(lock); // Should never fail
- periodicSM = NEW(new ClusterAPIPeriodicSM(ClusterAPI_mutex));
+ periodicSM = new ClusterAPIPeriodicSM(ClusterAPI_mutex);
// TODO: Should we do something with this return value?
eventProcessor.schedule_every(periodicSM, HRTIME_SECONDS(1), ET_CALL);
@@ -382,7 +382,7 @@ TSEnableClusterStatusCallout(TSClusterStatusHandle_t * h)
static void
send_machine_online_list(TSClusterStatusHandle_t * h)
{
- MachineStatusSM *msm = NEW(new MachineStatusSM(*h));
+ MachineStatusSM *msm = new MachineStatusSM(*h);
ink_atomiclist_push(&status_callout_atomic_q, (void *) msm);
}
@@ -395,7 +395,7 @@ send_machine_online_list(TSClusterStatusHandle_t * h)
static void
directed_machine_online(int Ipaddr, TSClusterStatusHandle_t * h)
{
- MachineStatusSM *msm = NEW(new MachineStatusSM(IP_TO_NODE_HANDLE(Ipaddr), NODE_ONLINE, *h));
+ MachineStatusSM *msm = new MachineStatusSM(IP_TO_NODE_HANDLE(Ipaddr), NODE_ONLINE, *h);
ink_atomiclist_push(&status_callout_atomic_q, (void *) msm);
}
@@ -407,7 +407,7 @@ directed_machine_online(int Ipaddr, TSClusterStatusHandle_t * h)
void
machine_online_APIcallout(int Ipaddr)
{
- MachineStatusSM *msm = NEW(new MachineStatusSM(IP_TO_NODE_HANDLE(Ipaddr), NODE_ONLINE));
+ MachineStatusSM *msm = new MachineStatusSM(IP_TO_NODE_HANDLE(Ipaddr), NODE_ONLINE);
ink_atomiclist_push(&status_callout_atomic_q, (void *) msm);
}
@@ -418,7 +418,7 @@ machine_online_APIcallout(int Ipaddr)
void
machine_offline_APIcallout(int Ipaddr)
{
- MachineStatusSM *msm = NEW(new MachineStatusSM(IP_TO_NODE_HANDLE(Ipaddr), NODE_OFFLINE));
+ MachineStatusSM *msm = new MachineStatusSM(IP_TO_NODE_HANDLE(Ipaddr), NODE_OFFLINE);
ink_atomiclist_push(&status_callout_atomic_q, (void *) msm);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cluster/ClusterCache.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterCache.cc b/iocore/cluster/ClusterCache.cc
index 8d4b6e5..570168b 100644
--- a/iocore/cluster/ClusterCache.cc
+++ b/iocore/cluster/ClusterCache.cc
@@ -1929,7 +1929,7 @@ CacheContinuation::disposeOfDataBuffer(void *d)
cc->write_cluster_vc->allow_remote_close();
if (handleDisposeEvent(0, cc) == EVENT_CONT) {
// Setup retry continuation.
- retryDisposeOfDataBuffer *retryCont = NEW(new retryDisposeOfDataBuffer(cc));
+ retryDisposeOfDataBuffer *retryCont = new retryDisposeOfDataBuffer(cc);
eventProcessor.schedule_in(retryCont, HRTIME_MSECONDS(10), ET_CALL);
}
}
@@ -3036,7 +3036,7 @@ CacheContinuation::forwardWaitEvent(int event, VConnection * c)
// if the read and write are sucessful, tunnel the read to the write
if (read_vc && write_vc) {
- res_data = NEW(new VCTee(read_vc, write_vc, vio));
+ res_data = new VCTee(read_vc, write_vc, vio);
if (vio) { // CACHE_EVENT_OPEN_READ_VIO
res = event;
res_data = &((VCTee *) read_vc)->vio;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cluster/ClusterConfig.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterConfig.cc b/iocore/cluster/ClusterConfig.cc
index a541364..332f10e 100644
--- a/iocore/cluster/ClusterConfig.cc
+++ b/iocore/cluster/ClusterConfig.cc
@@ -146,8 +146,8 @@ ClusterAccept::ClusterAcceptMachine(NetVConnection * NetVC)
}
Debug(CL_NOTE, "Accepting machine %u.%u.%u.%u", DOT_SEPARATED(remote_ip));
- ClusterHandler *ch = NEW(new ClusterHandler);
- ch->machine = NEW(new ClusterMachine(NULL, remote_ip));
+ ClusterHandler *ch = new ClusterHandler;
+ ch->machine = new ClusterMachine(NULL, remote_ip);
ch->ip = remote_ip;
ch->net_vc = NetVC;
eventProcessor.schedule_imm_signal(ch, ET_CLUSTER);
@@ -282,7 +282,7 @@ free_configuration(ClusterConfiguration * c, ClusterConfiguration * prev)
// chosen is to simply delete the object after some (very long)
// time after it has ceased to be accessible.
//
- eventProcessor.schedule_in(NEW(new ConfigurationContinuation(c, prev)), CLUSTER_CONFIGURATION_TIMEOUT, ET_CALL);
+ eventProcessor.schedule_in(new ConfigurationContinuation(c, prev), CLUSTER_CONFIGURATION_TIMEOUT, ET_CALL);
}
ClusterConfiguration *
@@ -294,7 +294,7 @@ configuration_add_machine(ClusterConfiguration * c, ClusterMachine * m)
EThread *thread = this_ethread();
ProxyMutex *mutex = thread->mutex;
int i = 0;
- ClusterConfiguration *cc = NEW(new ClusterConfiguration(*c));
+ ClusterConfiguration *cc = new ClusterConfiguration(*c);
// Find the place to insert this new machine
//
@@ -334,7 +334,7 @@ configuration_remove_machine(ClusterConfiguration * c, ClusterMachine * m)
//
// Build a new cluster configuration without a machine
//
- ClusterConfiguration *cc = NEW(new ClusterConfiguration(*c));
+ ClusterConfiguration *cc = new ClusterConfiguration(*c);
//
// remove m and move others down
//
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cluster/ClusterHandlerBase.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterHandlerBase.cc b/iocore/cluster/ClusterHandlerBase.cc
index 633743d..df81f0a 100644
--- a/iocore/cluster/ClusterHandlerBase.cc
+++ b/iocore/cluster/ClusterHandlerBase.cc
@@ -797,7 +797,7 @@ ClusterHandler::connectClusterEvent(int event, Event * e)
//
MachineList *cc = the_cluster_config();
if (!machine)
- machine = NEW(new ClusterMachine(hostname, ip, port));
+ machine = new ClusterMachine(hostname, ip, port);
#ifdef LOCAL_CLUSTER_TEST_MODE
if (!(cc && cc->find(ip, port))) {
#else
@@ -1135,8 +1135,8 @@ failed:
DOT_SEPARATED(ip), id, clusteringVersion._major, clusteringVersion._minor);
#endif
- read_vcs = NEW((new Queue<ClusterVConnectionBase, ClusterVConnectionBase::Link_read_link>[CLUSTER_BUCKETS]));
- write_vcs = NEW((new Queue<ClusterVConnectionBase, ClusterVConnectionBase::Link_write_link>[CLUSTER_BUCKETS]));
+ read_vcs = new Queue<ClusterVConnectionBase, ClusterVConnectionBase::Link_read_link>[CLUSTER_BUCKETS];
+ write_vcs = new Queue<ClusterVConnectionBase, ClusterVConnectionBase::Link_write_link>[CLUSTER_BUCKETS];
SET_HANDLER((ClusterContHandler) & ClusterHandler::beginClusterEvent);
// enable schedule_imm() on i/o completion (optimization)
@@ -1151,7 +1151,7 @@ failed:
int procs_online = ink_number_of_processors();
int total_callbacks = min(procs_online, MAX_COMPLETION_CALLBACK_EVENTS);
for (int n = 0; n < total_callbacks; ++n) {
- callout_cont[n] = NEW(new ClusterCalloutContinuation(this));
+ callout_cont[n] = new ClusterCalloutContinuation(this);
callout_events[n] = eventProcessor.schedule_every(callout_cont[n], COMPLETION_CALLBACK_PERIOD, ET_NET);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cluster/ClusterMachine.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterMachine.cc b/iocore/cluster/ClusterMachine.cc
index 408ae8a..244d8d6 100644
--- a/iocore/cluster/ClusterMachine.cc
+++ b/iocore/cluster/ClusterMachine.cc
@@ -61,7 +61,7 @@ void
create_this_cluster_machine()
{
the_cluster_config_mutex = new_ProxyMutex();
- cluster_machine = NEW(new ClusterMachine);
+ cluster_machine = new ClusterMachine;
}
ClusterMachine::ClusterMachine(char *ahostname, unsigned int aip, int aport)
@@ -198,7 +198,7 @@ free_ClusterMachine(ClusterMachine * m)
// delay before the final free
CLUSTER_INCREMENT_DYN_STAT(CLUSTER_MACHINES_FREED_STAT);
m->dead = true;
- eventProcessor.schedule_in(NEW(new MachineTimeoutContinuation(m)), MACHINE_TIMEOUT, ET_CALL);
+ eventProcessor.schedule_in(new MachineTimeoutContinuation(m), MACHINE_TIMEOUT, ET_CALL);
}
void
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cluster/ClusterProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterProcessor.cc b/iocore/cluster/ClusterProcessor.cc
index a16381a..eb73de1 100644
--- a/iocore/cluster/ClusterProcessor.cc
+++ b/iocore/cluster/ClusterProcessor.cc
@@ -702,11 +702,11 @@ ClusterProcessor::init()
// Cluster API Initializations
clusterAPI_init();
// Start global Cluster periodic event
- PeriodicClusterEvent = NEW(new GlobalClusterPeriodicEvent);
+ PeriodicClusterEvent = new GlobalClusterPeriodicEvent;
PeriodicClusterEvent->init();
- this_cluster = NEW(new Cluster);
- ClusterConfiguration *cc = NEW(new ClusterConfiguration);
+ this_cluster = new Cluster;
+ ClusterConfiguration *cc = new ClusterConfiguration;
this_cluster->configurations.push(cc);
cc->n_machines = 1;
cc->machines[0] = this_cluster_machine();
@@ -755,7 +755,7 @@ ClusterProcessor::start()
do_machine_config_change((void *) MACHINE_CONFIG, "proxy.config.cluster.machine_configuration");
#endif
- accept_handler = NEW(new ClusterAccept(&cluster_port, cluster_receive_buffer_size, cluster_send_buffer_size));
+ accept_handler = new ClusterAccept(&cluster_port, cluster_receive_buffer_size, cluster_send_buffer_size);
accept_handler->Init();
}
return 0;
@@ -767,7 +767,7 @@ ClusterProcessor::connect(char *hostname, int16_t id)
//
// Construct a cluster link to the given machine
//
- ClusterHandler *ch = NEW(new ClusterHandler);
+ ClusterHandler *ch = new ClusterHandler;
SET_CONTINUATION_HANDLER(ch, (ClusterContHandler) & ClusterHandler::connectClusterEvent);
ch->hostname = ats_strdup(hostname);
ch->connector = true;
@@ -781,7 +781,7 @@ ClusterProcessor::connect(unsigned int ip, int port, int16_t id, bool delay)
//
// Construct a cluster link to the given machine
//
- ClusterHandler *ch = NEW(new ClusterHandler);
+ ClusterHandler *ch = new ClusterHandler;
SET_CONTINUATION_HANDLER(ch, (ClusterContHandler) & ClusterHandler::connectClusterEvent);
ch->ip = ip;
ch->port = port;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cluster/test_I_Cluster.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/test_I_Cluster.cc b/iocore/cluster/test_I_Cluster.cc
index 3288e56..587834f 100644
--- a/iocore/cluster/test_I_Cluster.cc
+++ b/iocore/cluster/test_I_Cluster.cc
@@ -116,7 +116,7 @@ init_diags(char *bdt, char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/cluster/test_P_Cluster.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/test_P_Cluster.cc b/iocore/cluster/test_P_Cluster.cc
index 3288e56..587834f 100644
--- a/iocore/cluster/test_P_Cluster.cc
+++ b/iocore/cluster/test_P_Cluster.cc
@@ -116,7 +116,7 @@ init_diags(char *bdt, char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/dns/DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index a93b6c9..0d6d233 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -209,7 +209,7 @@ DNSProcessor::start(int, size_t stacksize) {
void
DNSProcessor::open(sockaddr const* target, int aoptions)
{
- DNSHandler *h = NEW(new DNSHandler);
+ DNSHandler *h = new DNSHandler;
h->options = aoptions;
h->mutex = thread->mutex;
@@ -1714,7 +1714,7 @@ static const char *dns_test_hosts[] = {
};
REGRESSION_TEST(DNS) (RegressionTest *t, int atype, int *pstatus) {
- eventProcessor.schedule_in(NEW(new DNSRegressionContinuation(4, 4, dns_test_hosts, t, atype, pstatus)),
+ eventProcessor.schedule_in(new DNSRegressionContinuation(4, 4, dns_test_hosts, t, atype, pstatus),
HRTIME_SECONDS(1));
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/dns/SplitDNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/SplitDNS.cc b/iocore/dns/SplitDNS.cc
index 372d97c..f0f0a98 100644
--- a/iocore/dns/SplitDNS.cc
+++ b/iocore/dns/SplitDNS.cc
@@ -139,7 +139,7 @@ SplitDNSConfig::startup()
//startup just check gsplit_dns_enabled
REC_ReadConfigInt32(gsplit_dns_enabled, "proxy.config.dns.splitDNS.enabled");
- splitDNSUpdate = NEW(new ConfigUpdateHandler<SplitDNSConfig>());
+ splitDNSUpdate = new ConfigUpdateHandler<SplitDNSConfig>();
splitDNSUpdate->attach("proxy.config.cache.splitdns.filename");
}
@@ -153,10 +153,10 @@ SplitDNSConfig::reconfigure()
if (0 == gsplit_dns_enabled)
return;
- SplitDNS *params = NEW(new SplitDNS);
+ SplitDNS *params = new SplitDNS;
params->m_SplitDNSlEnable = gsplit_dns_enabled;
- params->m_DNSSrvrTable = NEW(new DNS_table("proxy.config.dns.splitdns.filename", modulePrefix, &sdns_dest_tags));
+ params->m_DNSSrvrTable = new DNS_table("proxy.config.dns.splitdns.filename", modulePrefix, &sdns_dest_tags);
params->m_numEle = params->m_DNSSrvrTable->getEntryCount();
if (0 == params->m_DNSSrvrTable || (0 == params->m_numEle)) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/dns/test_I_DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/test_I_DNS.cc b/iocore/dns/test_I_DNS.cc
index ce4ef8a..e1434d9 100644
--- a/iocore/dns/test_I_DNS.cc
+++ b/iocore/dns/test_I_DNS.cc
@@ -108,7 +108,7 @@ init_diags(char *bdt, char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/dns/test_P_DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/test_P_DNS.cc b/iocore/dns/test_P_DNS.cc
index d340391..93438dd 100644
--- a/iocore/dns/test_P_DNS.cc
+++ b/iocore/dns/test_P_DNS.cc
@@ -50,7 +50,7 @@ struct NetTesterSM:public Continuation
switch (event) {
case VC_EVENT_READ_READY:
r = reader->read_avail();
- str = NEW(new char[r + 10]);
+ str = new char[r + 10];
reader->read(str, r);
printf("%s", str);
fflush(stdout);
@@ -59,7 +59,7 @@ struct NetTesterSM:public Continuation
/* FALLSTHROUGH */
case VC_EVENT_EOS:
r = reader->read_avail();
- str = NEW(new char[r + 10]);
+ str = new char[r + 10];
reader->read(str, r);
printf("%s", str);
fflush(stdout);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/eventsystem/IOBuffer.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/IOBuffer.cc b/iocore/eventsystem/IOBuffer.cc
index e6362c1..879e8ba 100644
--- a/iocore/eventsystem/IOBuffer.cc
+++ b/iocore/eventsystem/IOBuffer.cc
@@ -53,7 +53,7 @@ init_buffer_allocators()
if (s < a)
a = s;
- name = NEW(new char[64]);
+ name = new char[64];
snprintf(name, 64, "ioBufAllocator[%d]", i);
ioBufAllocator[i].re_init(name, s, n, a);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/eventsystem/P_Freer.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/P_Freer.h b/iocore/eventsystem/P_Freer.h
index b5f1591..74c52ab 100644
--- a/iocore/eventsystem/P_Freer.h
+++ b/iocore/eventsystem/P_Freer.h
@@ -49,7 +49,7 @@ public: // Needed by WinNT compiler (compiler bug)
template<class C> TS_INLINE void
new_Deleter(C * ap, ink_hrtime t)
{
- eventProcessor.schedule_in(NEW(new DeleterContinuation<C> (ap)), t, ET_CALL);
+ eventProcessor.schedule_in(new DeleterContinuation<C> (ap), t, ET_CALL);
}
template<class C> struct FreeCallContinuation: public Continuation
@@ -73,7 +73,7 @@ public: // Needed by WinNT compiler (compiler bug)
template<class C> TS_INLINE void
new_FreeCaller(C * ap, ink_hrtime t)
{
- eventProcessor.schedule_in(NEW(new FreeCallContinuation<C> (ap)), t, ET_CALL);
+ eventProcessor.schedule_in(new FreeCallContinuation<C> (ap), t, ET_CALL);
}
struct FreerContinuation;
@@ -101,7 +101,7 @@ struct FreerContinuation: public Continuation
TS_INLINE void
new_Freer(void *ap, ink_hrtime t)
{
- eventProcessor.schedule_in(NEW(new FreerContinuation(ap)), t, ET_CALL);
+ eventProcessor.schedule_in(new FreerContinuation(ap), t, ET_CALL);
}
template<class C> struct DereferContinuation: public Continuation
@@ -128,7 +128,7 @@ template<class C> struct DereferContinuation: public Continuation
template<class C> TS_INLINE void
new_Derefer(C * ap, ink_hrtime t)
{
- eventProcessor.schedule_in(NEW(new DereferContinuation<C> (ap)), t, ET_CALL);
+ eventProcessor.schedule_in(new DereferContinuation<C> (ap), t, ET_CALL);
}
#endif /* _Freer_h_ */
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/eventsystem/UnixEventProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/UnixEventProcessor.cc b/iocore/eventsystem/UnixEventProcessor.cc
index db50b37..14fb58a 100644
--- a/iocore/eventsystem/UnixEventProcessor.cc
+++ b/iocore/eventsystem/UnixEventProcessor.cc
@@ -43,7 +43,7 @@ EventProcessor::spawn_event_threads(int n_threads, const char* et_name, size_t s
new_thread_group_id = (EventType) n_thread_groups;
for (i = 0; i < n_threads; i++) {
- EThread *t = NEW(new EThread(REGULAR, n_ethreads + i));
+ EThread *t = new EThread(REGULAR, n_ethreads + i);
all_ethreads[n_ethreads + i] = t;
eventthread[new_thread_group_id][i] = t;
t->set_event_type(new_thread_group_id);
@@ -83,7 +83,7 @@ EventProcessor::start(int n_event_threads, size_t stacksize)
int first_thread = 1;
for (i = 0; i < n_event_threads; i++) {
- EThread *t = NEW(new EThread(REGULAR, i));
+ EThread *t = new EThread(REGULAR, i);
if (first_thread && !i) {
ink_thread_setspecific(Thread::thread_data_key, t);
global_mutex = t->mutex;
@@ -173,7 +173,7 @@ EventProcessor::spawn_thread(Continuation *cont, const char* thr_name, size_t st
Event *e = eventAllocator.alloc();
e->init(cont, 0, 0);
- all_dthreads[n_dthreads] = NEW(new EThread(DEDICATED, e, sem));
+ all_dthreads[n_dthreads] = new EThread(DEDICATED, e, sem);
e->ethread = all_dthreads[n_dthreads];
e->mutex = e->continuation->mutex = all_dthreads[n_dthreads]->mutex;
n_dthreads++;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/eventsystem/test_Buffer.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/test_Buffer.cc b/iocore/eventsystem/test_Buffer.cc
index 04eacbc..a86c86a 100644
--- a/iocore/eventsystem/test_Buffer.cc
+++ b/iocore/eventsystem/test_Buffer.cc
@@ -106,7 +106,7 @@ init_diags(const char *bdt, const char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
Warning("couldn't open diags log file '%s', " "will not log to this file", diags_logpath);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/eventsystem/test_Event.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/test_Event.cc b/iocore/eventsystem/test_Event.cc
index 5724320..fc2f9c3 100644
--- a/iocore/eventsystem/test_Event.cc
+++ b/iocore/eventsystem/test_Event.cc
@@ -107,7 +107,7 @@ init_diags(const char *bdt, const char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
Warning("couldn't open diags log file '%s', " "will not log to this file", diags_logpath);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index e4adbe0..ea902e9 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -399,8 +399,8 @@ HostDBCache::start(int flags)
Warning("Please set 'proxy.config.hostdb.storage_path' or 'proxy.config.local_state_dir'");
}
- hostDBStore = NEW(new Store);
- hostDBSpan = NEW(new Span);
+ hostDBStore = new Store;
+ hostDBSpan = new Span;
hostDBSpan->init(storage_path, storage_size);
hostDBStore->add(hostDBSpan);
@@ -415,8 +415,8 @@ HostDBCache::start(int flags)
Debug("hostdb", "unable to unlink %s", (const char *)config);
delete hostDBStore;
- hostDBStore = NEW(new Store);
- hostDBSpan = NEW(new Span);
+ hostDBStore = new Store;
+ hostDBSpan = new Span;
hostDBSpan->init(storage_path, storage_size);
hostDBStore->add(hostDBSpan);
@@ -486,7 +486,7 @@ HostDBProcessor::start(int, size_t)
// Sync HostDB, if we've asked for it.
//
if (hostdb_sync_frequency > 0)
- eventProcessor.schedule_imm(NEW(new HostDBSyncer));
+ eventProcessor.schedule_imm(new HostDBSyncer);
return 0;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/hostdb/MultiCache.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/MultiCache.cc b/iocore/hostdb/MultiCache.cc
index 629f87c..9c832c6 100644
--- a/iocore/hostdb/MultiCache.cc
+++ b/iocore/hostdb/MultiCache.cc
@@ -195,7 +195,7 @@ MultiCacheBase::initialize(Store *astore, char *afilename,
//
if (store)
delete store;
- store = NEW(new Store);
+ store = new Store;
astore->spread_alloc(*store, blocks, true);
unsigned int got = store->total_blocks();
@@ -213,7 +213,7 @@ MultiCacheBase::initialize(Store *astore, char *afilename,
if (lowest_level_data)
delete[]lowest_level_data;
- lowest_level_data = NEW(new char[lowest_level_data_size()]);
+ lowest_level_data = new char[lowest_level_data_size()];
ink_assert(lowest_level_data);
memset(lowest_level_data, 0xFF, lowest_level_data_size());
@@ -1192,9 +1192,9 @@ MultiCacheBase::sync_partitions(Continuation *cont)
// don't try to sync if we were not correctly initialized
if (data && mapped_header) {
if (heap_used[heap_halfspace] > halfspace_size() * MULTI_CACHE_HEAP_HIGH_WATER)
- eventProcessor.schedule_imm(NEW(new MultiCacheHeapGC(cont, this)), ET_CALL);
+ eventProcessor.schedule_imm(new MultiCacheHeapGC(cont, this), ET_CALL);
else
- eventProcessor.schedule_imm(NEW(new MultiCacheSync(cont, this)), ET_CALL);
+ eventProcessor.schedule_imm(new MultiCacheSync(cont, this), ET_CALL);
}
}
@@ -1264,7 +1264,7 @@ UnsunkPtrRegistry::alloc(int *poffset, int base)
return alloc(poffset, base);
}
if (!next) {
- next = NEW(new UnsunkPtrRegistry);
+ next = new UnsunkPtrRegistry;
next->mc = mc;
}
int s = MULTI_CACHE_UNSUNK_PTR_BLOCK_SIZE(mc->totalelements);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/hostdb/P_HostDBProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/P_HostDBProcessor.h b/iocore/hostdb/P_HostDBProcessor.h
index 94da9bf..f3ee41e 100644
--- a/iocore/hostdb/P_HostDBProcessor.h
+++ b/iocore/hostdb/P_HostDBProcessor.h
@@ -203,7 +203,7 @@ struct HostDBCache: public MultiCache<HostDBInfo>
int start(int flags = 0);
MultiCacheBase *dup()
{
- return NEW(new HostDBCache);
+ return new HostDBCache;
}
// This accounts for an average of 2 HostDBInfo per DNS cache (for round-robin etc.)
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/hostdb/P_MultiCache.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/P_MultiCache.h b/iocore/hostdb/P_MultiCache.h
index d465a67..f9aef9c 100644
--- a/iocore/hostdb/P_MultiCache.h
+++ b/iocore/hostdb/P_MultiCache.h
@@ -415,7 +415,7 @@ template<class C> struct MultiCache: public MultiCacheBase
MultiCacheBase *dup()
{
- return NEW(new MultiCache<C>);
+ return new MultiCache<C>;
}
void rebuild_element(int buck, char *elem, RebuildMC & r);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/hostdb/test_I_HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/test_I_HostDB.cc b/iocore/hostdb/test_I_HostDB.cc
index 10f0e74..fced5aa 100644
--- a/iocore/hostdb/test_I_HostDB.cc
+++ b/iocore/hostdb/test_I_HostDB.cc
@@ -108,13 +108,13 @@ init_diags(char *bdt, char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
- diags->print(NULL, DL_Warning, NULL, &loc,
- "couldn't open diags log file '%s', " "will not log to this file", diags_logpath);
+ diags->print(NULL, DL_Warning, NULL, &loc, "couldn't open diags log file '%s', " "will not log to this file",
+ diags_logpath);
}
diags->print(NULL, DL_Status, "STATUS", NULL, "opened %s", diags_logpath);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/hostdb/test_P_HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/test_P_HostDB.cc b/iocore/hostdb/test_P_HostDB.cc
index d33d64f..b4ef752 100644
--- a/iocore/hostdb/test_P_HostDB.cc
+++ b/iocore/hostdb/test_P_HostDB.cc
@@ -50,7 +50,7 @@ struct NetTesterSM:public Continuation
switch (event) {
case VC_EVENT_READ_READY:
r = reader->read_avail();
- str = NEW(new char[r + 10]);
+ str = new char[r + 10];
reader->read(str, r);
printf("%s", str);
fflush(stdout);
@@ -59,7 +59,7 @@ struct NetTesterSM:public Continuation
/* FALLSTHROUGH */
case VC_EVENT_EOS:
r = reader->read_avail();
- str = NEW(new char[r + 10]);
+ str = new char[r + 10];
reader->read(str, r);
printf("%s", str);
fflush(stdout);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/NetTest-http-server.c
----------------------------------------------------------------------
diff --git a/iocore/net/NetTest-http-server.c b/iocore/net/NetTest-http-server.c
index 6154e36..4fdde30 100644
--- a/iocore/net/NetTest-http-server.c
+++ b/iocore/net/NetTest-http-server.c
@@ -96,7 +96,7 @@ struct NetTesterSM:public Continuation
/* FALLSTHROUGH */
case VC_EVENT_EOS:
r = reader->read_avail();
- str = NEW(new char[r + 10]);
+ str = new char[r + 10];
reader->read(str, r);
Debug("net_test", "%s", str);
fflush(stdout);
@@ -152,7 +152,7 @@ struct NetTesterAccept:public Continuation
Debug("net_test", "Accepted a connection\n");
fflush(stdout);
NetVConnection *vc = (NetVConnection *) data;
- NEW(new NetTesterSM(new_ProxyMutex(), vc));
+ new NetTesterSM(new_ProxyMutex(), vc);
return EVENT_CONT;
}
@@ -189,8 +189,7 @@ test_main()
memset(b + strlen(response_hdr), 'x', 8000);
resp_blk->fill(doc_len = strlen(response_hdr) + 8000);
- Action *a = sslNetProcessor.accept(NEW(new NetTesterAccept(new_ProxyMutex())),
- 8080, true);
+ Action *a = sslNetProcessor.accept(new NetTesterAccept(new_ProxyMutex()), 8080, true);
return 0;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/P_UnixUDPConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_UnixUDPConnection.h b/iocore/net/P_UnixUDPConnection.h
index 5a7c03d..1ea5598 100644
--- a/iocore/net/P_UnixUDPConnection.h
+++ b/iocore/net/P_UnixUDPConnection.h
@@ -114,7 +114,7 @@ UDPConnection::recv(Continuation * c)
TS_INLINE UDPConnection *
new_UDPConnection(int fd)
{
- return (fd >= 0) ? NEW(new UnixUDPConnection(fd)) : 0;
+ return (fd >= 0) ? new UnixUDPConnection(fd) : 0;
}
#endif //__UNIXUDPCONNECTION_H_
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/SSLCertLookup.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLCertLookup.cc b/iocore/net/SSLCertLookup.cc
index 1f03ddb..bde0862 100644
--- a/iocore/net/SSLCertLookup.cc
+++ b/iocore/net/SSLCertLookup.cc
@@ -95,7 +95,7 @@ private:
};
SSLCertLookup::SSLCertLookup()
- : ssl_storage(NEW(new SSLContextStorage())), ssl_default(NULL)
+ : ssl_storage(new SSLContextStorage()), ssl_default(NULL)
{
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/SSLConfig.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLConfig.cc b/iocore/net/SSLConfig.cc
index 54813af..d795fad 100644
--- a/iocore/net/SSLConfig.cc
+++ b/iocore/net/SSLConfig.cc
@@ -263,7 +263,7 @@ void
SSLConfig::reconfigure()
{
SSLConfigParams *params;
- params = NEW(new SSLConfigParams);
+ params = new SSLConfigParams;
params->initialize(); // re-read configuration
configid = configProcessor.set(configid, params);
}
@@ -283,7 +283,7 @@ SSLConfig::release(SSLConfigParams * params)
void
SSLCertificateConfig::startup()
{
- sslCertUpdate = NEW(new ConfigUpdateHandler<SSLCertificateConfig>());
+ sslCertUpdate = new ConfigUpdateHandler<SSLCertificateConfig>();
sslCertUpdate->attach("proxy.config.ssl.server.multicert.filename");
sslCertUpdate->attach("proxy.config.ssl.server.cert.path");
sslCertUpdate->attach("proxy.config.ssl.server.private_key.path");
@@ -296,7 +296,7 @@ void
SSLCertificateConfig::reconfigure()
{
SSLConfig::scoped_config params;
- SSLCertLookup * lookup = NEW(new SSLCertLookup());
+ SSLCertLookup * lookup = new SSLCertLookup();
// Test SSL certificate loading startup. With large numbers of certificates, reloading can take time, so delay
// twice the healthcheck period to simulate a loading a large certificate set.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/SSLNetAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetAccept.cc b/iocore/net/SSLNetAccept.cc
index ecd103e..e849596 100644
--- a/iocore/net/SSLNetAccept.cc
+++ b/iocore/net/SSLNetAccept.cc
@@ -71,7 +71,7 @@ NetAccept *
SSLNetAccept::clone() const
{
NetAccept *na;
- na = NEW(new SSLNetAccept);
+ na = new SSLNetAccept;
*na = *this;
return na;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/SSLNetProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetProcessor.cc b/iocore/net/SSLNetProcessor.cc
index 4df64c3..eb48672 100644
--- a/iocore/net/SSLNetProcessor.cc
+++ b/iocore/net/SSLNetProcessor.cc
@@ -79,7 +79,7 @@ SSLNetProcessor::start(int number_of_ssl_threads, size_t stacksize)
NetAccept *
SSLNetProcessor::createNetAccept()
{
- return ((NetAccept *) NEW(new SSLNetAccept));
+ return (NetAccept *) new SSLNetAccept;
}
// Virtual function allows etype to be upgraded to ET_SSL for SSLNetProcessor. Does
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/SSLNextProtocolAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNextProtocolAccept.cc b/iocore/net/SSLNextProtocolAccept.cc
index 5be2f77..92524d0 100644
--- a/iocore/net/SSLNextProtocolAccept.cc
+++ b/iocore/net/SSLNextProtocolAccept.cc
@@ -129,7 +129,7 @@ SSLNextProtocolAccept::mainEvent(int event, void * edata)
// the endpoint that there is an accept to handle until the read completes
// and we know which protocol was negotiated.
netvc->registerNextProtocolSet(&this->protoset);
- netvc->do_io(VIO::READ, NEW(new SSLNextProtocolTrampoline(this, netvc->mutex)), 0, this->buffer, 0);
+ netvc->do_io(VIO::READ, new SSLNextProtocolTrampoline(this, netvc->mutex), 0, this->buffer, 0);
return EVENT_CONT;
default:
netvc->do_io(VIO::CLOSE);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/SSLNextProtocolSet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNextProtocolSet.cc b/iocore/net/SSLNextProtocolSet.cc
index 3460b21..325af27 100644
--- a/iocore/net/SSLNextProtocolSet.cc
+++ b/iocore/net/SSLNextProtocolSet.cc
@@ -110,7 +110,7 @@ SSLNextProtocolSet::registerEndpoint(const char * proto, Continuation * ep)
}
if (!findEndpoint((const unsigned char *)proto, len)) {
- this->endpoints.push(NEW(new NextProtocolEndpoint(proto, ep)));
+ this->endpoints.push(new NextProtocolEndpoint(proto, ep));
return true;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/SSLUtils.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 43548fc..f5083b9 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -299,7 +299,7 @@ ssl_context_enable_tickets(SSL_CTX * ctx, const char * ticket_key_path)
goto fail;
}
- ticket_key = NEW(new ssl_ticket_key_t());
+ ticket_key = new ssl_ticket_key_t();
memcpy(ticket_key->key_name, (const char *)ticket_key_data, 16);
memcpy(ticket_key->hmac_secret, (const char *)ticket_key_data + 16, 16);
memcpy(ticket_key->aes_key, (const char *)ticket_key_data + 32, 16);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/SessionAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SessionAccept.cc b/iocore/net/SessionAccept.cc
index 351ffff..138501e 100644
--- a/iocore/net/SessionAccept.cc
+++ b/iocore/net/SessionAccept.cc
@@ -25,7 +25,7 @@
#include "P_Net.h"
SessionAccept::SessionAccept(ProxyMutex *amutex)
- : Continuation(amutex)
+ : Continuation(amutex)
{
SET_HANDLER(&SessionAccept::mainEvent);
}
@@ -37,5 +37,5 @@ SessionAccept::~SessionAccept()
void *
SessionAccept::createNetAccept()
{
- return (NEW(new NetAccept));
+ return new NetAccept;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/UnixNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index 33806a1..c738a6a 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -87,14 +87,14 @@ private:
#endif
PollCont::PollCont(ProxyMutex *m, int pt):Continuation(m), net_handler(NULL), nextPollDescriptor(NULL), poll_timeout(pt) {
- pollDescriptor = NEW(new PollDescriptor);
+ pollDescriptor = new PollDescriptor;
pollDescriptor->init();
SET_HANDLER(&PollCont::pollEvent);
}
PollCont::PollCont(ProxyMutex *m, NetHandler *nh, int pt):Continuation(m), net_handler(nh), nextPollDescriptor(NULL), poll_timeout(pt)
{
- pollDescriptor = NEW(new PollDescriptor);
+ pollDescriptor = new PollDescriptor;
pollDescriptor->init();
SET_HANDLER(&PollCont::pollEvent);
}
@@ -219,7 +219,7 @@ initialize_thread_for_net(EThread *thread)
thread->schedule_imm(get_NetHandler(thread));
#ifndef INACTIVITY_TIMEOUT
- InactivityCop *inactivityCop = NEW(new InactivityCop(get_NetHandler(thread)->mutex));
+ InactivityCop *inactivityCop = new InactivityCop(get_NetHandler(thread)->mutex);
thread->schedule_every(inactivityCop, HRTIME_SECONDS(1));
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/UnixNetAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index 1e2c410..f9d7559 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -543,7 +543,7 @@ NetAccept *
NetAccept::clone() const
{
NetAccept *na;
- na = NEW(new NetAccept);
+ na = new NetAccept;
*na = *this;
return na;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/UnixNetPages.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetPages.cc b/iocore/net/UnixNetPages.cc
index 7a19c51..bec4c8c 100644
--- a/iocore/net/UnixNetPages.cc
+++ b/iocore/net/UnixNetPages.cc
@@ -213,7 +213,7 @@ ShowNet(Continuation * c, HTTPHdr * h):
Action *
register_ShowNet(Continuation * c, HTTPHdr * h)
{
- ShowNet *s = NEW(new ShowNet(c, h));
+ ShowNet *s = new ShowNet(c, h);
int path_len;
const char *path = h->url_get()->path_get(&path_len);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/UnixNetProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index 92dfbcf..a16946f 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -129,7 +129,7 @@ UnixNetProcessor::accept_internal(Continuation *cont, int fd, AcceptOptions cons
if (should_filter_int > 0 && opt.etype == ET_NET)
na->server.http_accept_filter = true;
- na->action_ = NEW(new NetAcceptAction());
+ na->action_ = new NetAcceptAction();
*na->action_ = cont;
na->action_->server = &na->server;
na->callback_on_open = opt.f_callback_on_open;
@@ -381,7 +381,7 @@ NetProcessor::connect_s(Continuation * cont, sockaddr const* target,
int timeout, NetVCOptions * opt)
{
Debug("iocore_net_connect", "NetProcessor::connect_s called");
- CheckConnect *c = NEW(new CheckConnect(cont->mutex));
+ CheckConnect *c = new CheckConnect(cont->mutex);
return c->connect_s(cont, target, timeout, opt);
}
@@ -416,7 +416,7 @@ UnixNetProcessor::start(int, size_t)
// Socks
if (!netProcessor.socks_conf_stuff) {
- socks_conf_stuff = NEW(new socks_conf_struct);
+ socks_conf_stuff = new socks_conf_struct;
loadSocksConfiguration(socks_conf_stuff);
if (!socks_conf_stuff->socks_needed && socks_conf_stuff->accept_enabled) {
Warning("We can not have accept_enabled and socks_needed turned off" " disabling Socks accept\n");
@@ -450,7 +450,7 @@ UnixNetProcessor::start(int, size_t)
NetAccept *
UnixNetProcessor::createNetAccept()
{
- return (NEW(new NetAccept));
+ return new NetAccept;
}
NetVConnection *
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/UnixNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index d29ccc0..7f253e5 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -681,7 +681,7 @@ UnixNetVConnection::send_OOB(Continuation *cont, char *buf, int len)
return ACTION_RESULT_DONE;
}
if (written > 0 && written < len) {
- u->oob_ptr = NEW(new OOB_callback(mutex, this, cont, buf + written, len - written));
+ u->oob_ptr = new OOB_callback(mutex, this, cont, buf + written, len - written);
u->oob_ptr->trigger = mutex->thread_holding->schedule_in_local(u->oob_ptr, HRTIME_MSECONDS(10));
return u->oob_ptr->trigger;
} else {
@@ -689,7 +689,7 @@ UnixNetVConnection::send_OOB(Continuation *cont, char *buf, int len)
// expensive for this
written = -errno;
ink_assert(written == -EAGAIN || written == -ENOTCONN);
- u->oob_ptr = NEW(new OOB_callback(mutex, this, cont, buf, len));
+ u->oob_ptr = new OOB_callback(mutex, this, cont, buf, len);
u->oob_ptr->trigger = mutex->thread_holding->schedule_in_local(u->oob_ptr, HRTIME_MSECONDS(10));
return u->oob_ptr->trigger;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/UnixUDPNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index cf3d7a3..9201fdf 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -299,7 +299,7 @@ UDPReadContinuation::setupPollDescriptor()
EThread *et = (EThread *) this_thread();
PollCont *pc = get_PollCont(et);
if (pc->nextPollDescriptor == NULL) {
- pc->nextPollDescriptor = NEW(new PollDescriptor);
+ pc->nextPollDescriptor = new PollDescriptor;
pc->nextPollDescriptor->init();
}
pfd = pc->nextPollDescriptor->alloc();
@@ -604,7 +604,7 @@ UDPNetProcessor::UDPBind(Continuation * cont, sockaddr const* addr, int send_buf
if ((res = safe_getsockname(fd, &myaddr.sa, &myaddr_len)) < 0) {
goto Lerror;
}
- n = NEW(new UnixUDPConnection(fd));
+ n = new UnixUDPConnection(fd);
Debug("udpnet", "UDPNetProcessor::UDPBind: %p fd=%d", n, fd);
n->setBinding(&myaddr.sa);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/test_I_Net.cc
----------------------------------------------------------------------
diff --git a/iocore/net/test_I_Net.cc b/iocore/net/test_I_Net.cc
index c2e41a6..5f54f1d 100644
--- a/iocore/net/test_I_Net.cc
+++ b/iocore/net/test_I_Net.cc
@@ -108,7 +108,7 @@ init_diags(char *bdt, char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/test_I_UDPNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/test_I_UDPNet.cc b/iocore/net/test_I_UDPNet.cc
index 88d5c59..c3fef81 100644
--- a/iocore/net/test_I_UDPNet.cc
+++ b/iocore/net/test_I_UDPNet.cc
@@ -112,7 +112,7 @@ init_diags(char *bdt, char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/test_P_Net.cc
----------------------------------------------------------------------
diff --git a/iocore/net/test_P_Net.cc b/iocore/net/test_P_Net.cc
index bb742c8..ba402d7 100644
--- a/iocore/net/test_P_Net.cc
+++ b/iocore/net/test_P_Net.cc
@@ -50,7 +50,7 @@ struct NetTesterSM:public Continuation
switch (event) {
case VC_EVENT_READ_READY:
r = reader->read_avail();
- str = NEW(new char[r + 10]);
+ str = new char[r + 10];
reader->read(str, r);
printf("%s", str);
fflush(stdout);
@@ -59,7 +59,7 @@ struct NetTesterSM:public Continuation
/* FALLSTHROUGH */
case VC_EVENT_EOS:
r = reader->read_avail();
- str = NEW(new char[r + 10]);
+ str = new char[r + 10];
reader->read(str, r);
printf("%s", str);
fflush(stdout);
@@ -90,7 +90,7 @@ struct NetTesterAccept:public Continuation
printf("Accepted a connection\n");
fflush(stdout);
NetVConnection *vc = (NetVConnection *) data;
- NEW(new NetTesterSM(new_ProxyMutex(), vc));
+ new NetTesterSM(new_ProxyMutex(), vc);
return EVENT_CONT;
}
@@ -107,6 +107,6 @@ main()
MIOBuffer *mbuf = new_MIOBuffer(5);
eventProcessor.start(1);
netProcessor.start();
- netProcessor.accept(NEW(new NetTesterAccept(new_ProxyMutex())), 8080, true);
+ netProcessor.accept(new NetTesterAccept(new_ProxyMutex()), 8080, true);
this_thread()->execute();
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/net/test_P_UDPNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/test_P_UDPNet.cc b/iocore/net/test_P_UDPNet.cc
index 4fc7742..fc8fde8 100644
--- a/iocore/net/test_P_UDPNet.cc
+++ b/iocore/net/test_P_UDPNet.cc
@@ -112,7 +112,7 @@ init_diags(char *bdt, char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/iocore/utils/diags.i
----------------------------------------------------------------------
diff --git a/iocore/utils/diags.i b/iocore/utils/diags.i
index 413b5f1..a6e72e8 100644
--- a/iocore/utils/diags.i
+++ b/iocore/utils/diags.i
@@ -106,7 +106,7 @@ init_diags(char *bdt, char *bat)
}
}
- diags = NEW(new Diags(bdt, bat, diags_log_fp));
+ diags = new Diags(bdt, bat, diags_log_fp);
if (diags_log_fp == NULL) {
SrcLoc loc(__FILE__, __FUNCTION__, __LINE__);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/records/RecLocal.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecLocal.cc b/lib/records/RecLocal.cc
index 3a2371a..8db081e 100644
--- a/lib/records/RecLocal.cc
+++ b/lib/records/RecLocal.cc
@@ -97,7 +97,7 @@ sync_thr(void *data)
static void *
sync_thr(void *data)
{
- textBuffer *tb = NEW(new textBuffer(65536));
+ textBuffer *tb = new textBuffer(65536);
Rollback *rb;
bool inc_version;
bool written;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/records/RecProcess.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecProcess.cc b/lib/records/RecProcess.cc
index 8cab1de..0a38cb8 100644
--- a/lib/records/RecProcess.cc
+++ b/lib/records/RecProcess.cc
@@ -376,7 +376,7 @@ struct sync_cont: public Continuation
: Continuation(m)
{
SET_HANDLER(&sync_cont::sync);
- m_tb = NEW(new textBuffer(65536));
+ m_tb = new textBuffer(65536);
}
~sync_cont()
@@ -484,15 +484,15 @@ RecProcessStart(void)
}
Debug("statsproc", "Starting sync continuations:");
- raw_stat_sync_cont *rssc = NEW(new raw_stat_sync_cont(new_ProxyMutex()));
+ raw_stat_sync_cont *rssc = new raw_stat_sync_cont(new_ProxyMutex());
Debug("statsproc", "\traw-stat syncer");
raw_stat_sync_cont_event = eventProcessor.schedule_every(rssc, HRTIME_MSECONDS(g_rec_raw_stat_sync_interval_ms), ET_TASK);
- config_update_cont *cuc = NEW(new config_update_cont(new_ProxyMutex()));
+ config_update_cont *cuc = new config_update_cont(new_ProxyMutex());
Debug("statsproc", "\tconfig syncer");
config_update_cont_event = eventProcessor.schedule_every(cuc, HRTIME_MSECONDS(g_rec_config_update_interval_ms), ET_TASK);
- sync_cont *sc = NEW(new sync_cont(new_ProxyMutex()));
+ sync_cont *sc = new sync_cont(new_ProxyMutex());
Debug("statsproc", "\tremote syncer");
sync_cont_event = eventProcessor.schedule_every(sc, HRTIME_MSECONDS(g_rec_remote_sync_interval_ms), ET_TASK);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/records/test_I_RecLocal.cc
----------------------------------------------------------------------
diff --git a/lib/records/test_I_RecLocal.cc b/lib/records/test_I_RecLocal.cc
index 996167b..c45f3f4 100644
--- a/lib/records/test_I_RecLocal.cc
+++ b/lib/records/test_I_RecLocal.cc
@@ -254,7 +254,7 @@ main(int argc, char **argv)
log_fp = NULL;
}
}
- diags = NEW(new Diags("rec", NULL, log_fp));
+ diags = new Diags("rec", NULL, log_fp);
diags->activate_taglist(diags->base_debug_tags, DiagsTagType_Debug);
diags->print(NULL, DTA(DL_Note), "Starting '%s'", argv[0]);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/records/test_RecProcess.i
----------------------------------------------------------------------
diff --git a/lib/records/test_RecProcess.i b/lib/records/test_RecProcess.i
index 4f15703..d56353a 100644
--- a/lib/records/test_RecProcess.i
+++ b/lib/records/test_RecProcess.i
@@ -631,7 +631,7 @@ main(int argc, char **argv)
log_fp = NULL;
}
}
- diags = NEW(new Diags("rec", NULL, log_fp));
+ diags = new Diags("rec", NULL, log_fp);
diags->activate_taglist(diags->base_debug_tags, DiagsTagType_Debug);
diags->print(NULL, DL_Note, NULL, NULL, "Starting '%s'", argv[0]);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/Compatability.h
----------------------------------------------------------------------
diff --git a/lib/ts/Compatability.h b/lib/ts/Compatability.h
index 0cbc2fb..c88d4ba 100644
--- a/lib/ts/Compatability.h
+++ b/lib/ts/Compatability.h
@@ -70,6 +70,4 @@ typedef uint32_t in_addr_t;
#define NEED_HRTIME
-#include "Resource.h"
-
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/Diags.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Diags.cc b/lib/ts/Diags.cc
index ba4e105..ec62648 100644
--- a/lib/ts/Diags.cc
+++ b/lib/ts/Diags.cc
@@ -35,6 +35,7 @@
****************************************************************************/
#include "ink_platform.h"
+#include "ink_memory.h"
#include "ink_defs.h"
#include "ink_error.h"
#include "ink_assert.h"
@@ -416,7 +417,7 @@ Diags::activate_taglist(const char *taglist, DiagsTagType mode)
if (activated_tags[mode]) {
delete activated_tags[mode];
}
- activated_tags[mode] = NEW(new DFA);
+ activated_tags[mode] = new DFA;
activated_tags[mode]->compile(taglist);
unlock();
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/DynArray.h
----------------------------------------------------------------------
diff --git a/lib/ts/DynArray.h b/lib/ts/DynArray.h
index 3820d75..aa7a599 100644
--- a/lib/ts/DynArray.h
+++ b/lib/ts/DynArray.h
@@ -24,10 +24,6 @@
#ifndef __DYN_ARRAY_H__
#define __DYN_ARRAY_H__
-
-#include "Resource.h"
-
-
template<class T> class DynArray {
public:
DynArray(const T * val = 0, intptr_t initial_size = 0);
@@ -171,7 +167,7 @@ template<class T> inline void DynArray<T>::resize(intptr_t new_size)
T *new_data;
intptr_t i;
- new_data = NEW(new T[new_size]);
+ new_data = new T[new_size];
for (i = 0; i < size; i++) {
new_data[i] = data[i];
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/HostLookup.cc
----------------------------------------------------------------------
diff --git a/lib/ts/HostLookup.cc b/lib/ts/HostLookup.cc
index af8bfdb..bdb4a05 100644
--- a/lib/ts/HostLookup.cc
+++ b/lib/ts/HostLookup.cc
@@ -340,7 +340,7 @@ private:
charIndex::charIndex():illegalKey(NULL)
{
- root = NEW(new charIndex_el);
+ root = new charIndex_el;
}
charIndex::~charIndex()
@@ -412,7 +412,7 @@ charIndex::Insert(const char *match_data, HostBranch * toInsert)
// Check to see if we need to expand the table
if (next == NULL) {
- next = NEW(new charIndex_el);
+ next = new charIndex_el;
cur->next_level[index] = next;
}
cur = next;
@@ -777,7 +777,7 @@ num_el(-1),
matcher_name(name)
{
- root = NEW(new HostBranch);
+ root = new HostBranch;
root->level = 0;
root->type = HOST_TERMINAL;
root->next_level = NULL;
@@ -902,11 +902,11 @@ HostLookup::TableNewLevel(HostBranch * from, const char *level_data)
// Use the charIndex for high speed matching at the first level of
// the table. The first level is short strings, ie: com, edu, jp, fr
if (from->level == 0) {
- new_ci_table = NEW(new charIndex);
+ new_ci_table = new charIndex;
from->type = HOST_INDEX;
from->next_level = new_ci_table;
} else {
- new_ha_table = NEW(new hostArray);
+ new_ha_table = new hostArray;
from->type = HOST_ARRAY;
from->next_level = new_ha_table;
}
@@ -937,7 +937,7 @@ HostLookup::InsertBranch(HostBranch * insert_in, const char *level_data)
InkHashTable *new_ht;
- HostBranch *new_branch = NEW(new HostBranch);
+ HostBranch *new_branch = new HostBranch;
new_branch->type = HOST_TERMINAL;
new_branch->level = insert_in->level + 1;
new_branch->next_level = NULL;
@@ -1289,7 +1289,7 @@ HostLookup::AllocateSpace(int num_entries)
// Should not have been allocated before
ink_assert(array_len == -1);
- leaf_array = NEW(new HostLeaf[num_entries]);
+ leaf_array = new HostLeaf[num_entries];
memset(leaf_array, 0, sizeof(HostLeaf) * num_entries);
array_len = num_entries;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/Layout.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Layout.cc b/lib/ts/Layout.cc
index d1001cb..cf85bd8 100644
--- a/lib/ts/Layout.cc
+++ b/lib/ts/Layout.cc
@@ -39,7 +39,7 @@ void
Layout::create(const char *prefix)
{
if (layout == NULL) {
- layout = NEW(new Layout(prefix));
+ layout = new Layout(prefix);
}
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/ts/Makefile.am b/lib/ts/Makefile.am
index 0faf502..97c37d7 100644
--- a/lib/ts/Makefile.am
+++ b/lib/ts/Makefile.am
@@ -78,8 +78,6 @@ libtsutil_la_SOURCES = \
Regex.h \
Regression.cc \
Regression.h \
- Resource.cc \
- Resource.h \
SimpleTokenizer.h \
TestBox.h \
TextBuffer.cc \
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/ParseRules.h
----------------------------------------------------------------------
diff --git a/lib/ts/ParseRules.h b/lib/ts/ParseRules.h
index dca6236..6bc7483 100644
--- a/lib/ts/ParseRules.h
+++ b/lib/ts/ParseRules.h
@@ -24,7 +24,6 @@
#if !defined (_ParseRules_h_)
#define _ParseRules_h_
-#include "Resource.h"
#include <string.h>
#include "ink_defs.h"
@@ -495,20 +494,6 @@ ParseRules::is_pchar(const char *seq)
else
return is_hex(seq[1]) && is_hex(seq[2]);
#else
-#if defined(THIS_IS_THE_ORIGINAL_CODE)
- if (is_uchar(seq))
- return (true);
-
- switch (seq[0]) {
- case ':':
- case '@':
- case '&':
- case '=':
- case '+':
- return (true);
- }
- return (false);
-#else
if (is_unreserved(*seq))
return (true);
@@ -522,7 +507,6 @@ ParseRules::is_pchar(const char *seq)
}
return (false);
#endif
-#endif
}
inline CTypeResult
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/Resource.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Resource.cc b/lib/ts/Resource.cc
deleted file mode 100644
index 3d171e0..0000000
--- a/lib/ts/Resource.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/** @file
-
- A brief file description
-
- @section license License
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "ink_defs.h"
-#include "Resource.h"
-
-
-
-#if defined(TRACK_MEMORY)
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-void *
-operator new(size_t size)
-{
- return ats_malloc((unsigned int) size);
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-void operator
-delete(void *p)
-{
- ats_free(p);
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-void *
-operator new[] (size_t size)
-{
- return ats_malloc((unsigned int) size);
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-void
-operator delete[] (void *p)
-{
- ats_free(p);
-}
-
-#endif /* TRACK_MEMORY */
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/Resource.h
----------------------------------------------------------------------
diff --git a/lib/ts/Resource.h b/lib/ts/Resource.h
deleted file mode 100644
index f241853..0000000
--- a/lib/ts/Resource.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/** @file
-
- A brief file description
-
- @section license License
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#ifndef __RESOURCE_H__
-#define __RESOURCE_H__
-
-
-#include <stdlib.h>
-#include "ink_resource.h"
-
-// TODO: TS-567 Clean this up!
-
-#ifdef TRACK_MEMORY
-
-#define NEW(mem) _xtrack_helper (mem, RES_MEM_PATH)
-
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x500)
-void *operator
-new(size_t)
-throw(std::bad_alloc);
-void operator
-delete(void *)
-throw();
-#else
-extern void *operator new(size_t size);
-extern void operator delete(void *p);
-#endif
-
-#if !defined(__SUNPRO_CC) && !defined (_WIN64)
-extern void *operator new[] (size_t size);
-extern void operator delete[] (void *p);
-#endif
-
-template<class T> static inline T *
-_xtrack_helper(T * ptr, const char *path)
-{
- return (T *) _xtrack(ptr, path);
-}
-
-#else
-
-#define NEW(mem) mem
-
-#endif
-#endif /* __RESOURCE_H__ */
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/ink_memory.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_memory.h b/lib/ts/ink_memory.h
index edc0ee1..69ac56f 100644
--- a/lib/ts/ink_memory.h
+++ b/lib/ts/ink_memory.h
@@ -24,6 +24,7 @@
#define _ink_memory_h_
#include <ctype.h>
+#include <string.h>
#include <strings.h>
#include "ink_config.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/libts.h
----------------------------------------------------------------------
diff --git a/lib/ts/libts.h b/lib/ts/libts.h
index 5fc6dea..aa19d40 100644
--- a/lib/ts/libts.h
+++ b/lib/ts/libts.h
@@ -91,7 +91,6 @@
#include "Ptr.h"
#include "RawHashTable.h"
#include "Regex.h"
-#include "Resource.h"
#include "SimpleTokenizer.h"
#include "TextBuffer.h"
#include "Tokenizer.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/lib/ts/llqueue.cc
----------------------------------------------------------------------
diff --git a/lib/ts/llqueue.cc b/lib/ts/llqueue.cc
index a700078..4c20087 100644
--- a/lib/ts/llqueue.cc
+++ b/lib/ts/llqueue.cc
@@ -22,6 +22,7 @@
*/
#include "ink_config.h"
+#include "ink_memory.h"
#include <stdio.h>
#include <stdlib.h>
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/mgmt/Main.cc
----------------------------------------------------------------------
diff --git a/mgmt/Main.cc b/mgmt/Main.cc
index 79b6b92..b0c352f 100644
--- a/mgmt/Main.cc
+++ b/mgmt/Main.cc
@@ -546,7 +546,7 @@ main(int argc, char **argv)
// Bootstrap the Diags facility so that we can use it while starting
// up the manager
- diagsConfig = NEW(new DiagsConfig(DIAGS_LOG_FILENAME, debug_tags, action_tags, false));
+ diagsConfig = new DiagsConfig(DIAGS_LOG_FILENAME, debug_tags, action_tags, false);
diags = diagsConfig->diags;
diags->prefix_str = "Manager ";
@@ -592,12 +592,12 @@ main(int argc, char **argv)
// diagsConfig->reconfigure_diags(); INKqa11968
/*
delete diags;
- diags = NEW (new Diags(debug_tags,action_tags));
+ diags = new Diags(debug_tags,action_tags);
*/
}
// INKqa11968: need to set up callbacks and diags data structures
// using configuration in records.config
- diagsConfig = NEW(new DiagsConfig(DIAGS_LOG_FILENAME, debug_tags, action_tags, true));
+ diagsConfig = new DiagsConfig(DIAGS_LOG_FILENAME, debug_tags, action_tags, true);
diags = diagsConfig->diags;
RecSetDiags(diags);
diags->prefix_str = "Manager ";
@@ -729,7 +729,7 @@ main(int argc, char **argv)
ticker = time(NULL);
mgmt_log("[TrafficManager] Setup complete\n");
- statProcessor = NEW(new StatProcessor());
+ statProcessor = new StatProcessor();
for (;;) {
lmgmt->processEventQueue();
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/mgmt/ProxyConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/ProxyConfig.cc b/mgmt/ProxyConfig.cc
index 7743b9f..9576f58 100644
--- a/mgmt/ProxyConfig.cc
+++ b/mgmt/ProxyConfig.cc
@@ -160,7 +160,7 @@ ConfigProcessor::set(unsigned int id, ConfigInfo * info, unsigned timeout_secs)
// The ConfigInfoReleaser now takes our refcount, but
// someother thread might also have one ...
ink_assert(old_info->refcount() > 0);
- eventProcessor.schedule_in(NEW(new ConfigInfoReleaser(id, old_info)), HRTIME_SECONDS(timeout_secs));
+ eventProcessor.schedule_in(new ConfigInfoReleaser(id, old_info), HRTIME_SECONDS(timeout_secs));
}
return id;
@@ -249,7 +249,7 @@ struct RegressionConfig : public ConfigInfo
template <typename CallType>
static void defer(int count, CallType call) {
- eventProcessor.schedule_in(NEW(new RegressionConfig::DeferredCall<CallType>(count, call)), HRTIME_MSECONDS(500));
+ eventProcessor.schedule_in(new RegressionConfig::DeferredCall<CallType>(count, call), HRTIME_MSECONDS(500));
}
RegressionConfig(RegressionTest * r, int * ps, unsigned f)
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/mgmt/ProxyConfig.h
----------------------------------------------------------------------
diff --git a/mgmt/ProxyConfig.h b/mgmt/ProxyConfig.h
index bb55f1b..39afd92 100644
--- a/mgmt/ProxyConfig.h
+++ b/mgmt/ProxyConfig.h
@@ -108,7 +108,7 @@ struct ConfigUpdateContinuation : public Continuation
template <typename UpdateClass> int
ConfigScheduleUpdate(ProxyMutex * mutex) {
- eventProcessor.schedule_imm(NEW(new ConfigUpdateContinuation<UpdateClass>(mutex)), ET_CALL);
+ eventProcessor.schedule_imm(new ConfigUpdateContinuation<UpdateClass>(mutex), ET_CALL);
return 0;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7353f669/mgmt/api/EventCallback.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/EventCallback.cc b/mgmt/api/EventCallback.cc
index 3cd6072..8183f1c 100644
--- a/mgmt/api/EventCallback.cc
+++ b/mgmt/api/EventCallback.cc
@@ -30,6 +30,7 @@
***************************************************************************/
#include "ink_config.h"
+#include "ink_memory.h"
#include "EventCallback.h"
#include "CoreAPIShared.h"