You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2020/05/04 22:55:26 UTC
[trafficserver] 01/02: GCC 10 fixes - simple fixes.
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit be584052e2ac2b0867e64d3d743f92880ddb696d
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Fri May 1 11:53:23 2020 -0500
GCC 10 fixes - simple fixes.
---
iocore/cache/P_CacheTest.h | 2 +-
proxy/http/HttpTunnel.cc | 4 ++--
src/tscore/Arena.cc | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/iocore/cache/P_CacheTest.h b/iocore/cache/P_CacheTest.h
index ba9814e..47f0cfd 100644
--- a/iocore/cache/P_CacheTest.h
+++ b/iocore/cache/P_CacheTest.h
@@ -44,7 +44,7 @@ struct PinnedDocTable : public Continuation {
int remove(CacheKey *key);
int cleanup(int event, Event *e);
- PinnedDocTable() : Continuation(new_ProxyMutex()) { memset(bucket, 0, sizeof(Queue<PinnedDocEntry>) * PINNED_DOC_TABLE_SIZE); }
+ PinnedDocTable() : Continuation(new_ProxyMutex()) { ink_zero(bucket); }
};
struct CacheTestHost {
diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index 2b7f820..4fbac85 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -479,8 +479,8 @@ HttpTunnel::reset()
num_producers = 0;
num_consumers = 0;
- memset(consumers, 0, sizeof(consumers));
- memset(producers, 0, sizeof(producers));
+ ink_zero(consumers);
+ ink_zero(producers);
}
void
diff --git a/src/tscore/Arena.cc b/src/tscore/Arena.cc
index 81af84c..e26a20a 100644
--- a/src/tscore/Arena.cc
+++ b/src/tscore/Arena.cc
@@ -48,8 +48,8 @@ blk_alloc(int size)
}
blk->next = nullptr;
- blk->m_heap_end = &blk->data[size];
- blk->m_water_level = &blk->data[0];
+ blk->m_heap_end = blk->data + size;
+ blk->m_water_level = blk->data;
return blk;
}