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 2018/04/29 19:19:02 UTC
[trafficserver] 02/02: Updated to new clang-format
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit d8feb83a9d39d269a06717e708b419ebd190c2b9
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Sun Apr 29 13:18:29 2018 -0600
Updated to new clang-format
---
iocore/net/QUICNet.cc | 4 +---
iocore/net/QUICNetProcessor.cc | 4 +---
iocore/net/QUICNextProtocolAccept.cc | 4 +---
iocore/net/quic/Mock.h | 3 ++-
iocore/net/quic/QUICCongestionController.cc | 14 +++++++-------
iocore/net/quic/QUICFrame.cc | 3 ++-
iocore/net/quic/QUICFrame.h | 2 +-
iocore/net/quic/QUICFrameGenerator.h | 2 +-
iocore/net/quic/QUICHandshake.cc | 4 +---
iocore/net/quic/QUICHandshakeProtocol.cc | 4 +---
iocore/net/quic/QUICHandshakeProtocol.h | 14 +++++++-------
iocore/net/quic/QUICPacket.cc | 4 +---
iocore/net/quic/QUICTLS.cc | 4 +---
iocore/net/quic/test/test_QUICKeyGenerator.cc | 4 ++--
iocore/net/quic/test/test_QUICLossDetector.cc | 2 +-
lib/records/I_RecHttp.h | 2 +-
proxy/hq/HQClientSession.cc | 4 +---
proxy/hq/HQDataFramer.cc | 4 +---
proxy/hq/HQFrame.cc | 8 ++------
proxy/hq/HQHeaderVIOAdaptor.cc | 4 +---
proxy/hq/HQSessionAccept.cc | 4 +---
proxy/hq/HQStreamDataVIOAdaptor.cc | 4 +---
22 files changed, 38 insertions(+), 64 deletions(-)
diff --git a/iocore/net/QUICNet.cc b/iocore/net/QUICNet.cc
index f51c5ac..83411ef 100644
--- a/iocore/net/QUICNet.cc
+++ b/iocore/net/QUICNet.cc
@@ -57,9 +57,7 @@ QUICPollCont::QUICPollCont(Ptr<ProxyMutex> &m, NetHandler *nh) : Continuation(m.
SET_HANDLER(&QUICPollCont::pollEvent);
}
-QUICPollCont::~QUICPollCont()
-{
-}
+QUICPollCont::~QUICPollCont() {}
void
QUICPollCont::_process_long_header_packet(QUICPollEvent *e, NetHandler *nh)
diff --git a/iocore/net/QUICNetProcessor.cc b/iocore/net/QUICNetProcessor.cc
index e580a62..66c16d8 100644
--- a/iocore/net/QUICNetProcessor.cc
+++ b/iocore/net/QUICNetProcessor.cc
@@ -34,9 +34,7 @@
QUICNetProcessor quic_NetProcessor;
-QUICNetProcessor::QUICNetProcessor()
-{
-}
+QUICNetProcessor::QUICNetProcessor() {}
QUICNetProcessor::~QUICNetProcessor()
{
diff --git a/iocore/net/QUICNextProtocolAccept.cc b/iocore/net/QUICNextProtocolAccept.cc
index bdd89ed..d96d275 100644
--- a/iocore/net/QUICNextProtocolAccept.cc
+++ b/iocore/net/QUICNextProtocolAccept.cc
@@ -98,6 +98,4 @@ QUICNextProtocolAccept::cloneProtoSet()
return this->protoset.clone();
}
-QUICNextProtocolAccept::~QUICNextProtocolAccept()
-{
-}
+QUICNextProtocolAccept::~QUICNextProtocolAccept() {}
diff --git a/iocore/net/quic/Mock.h b/iocore/net/quic/Mock.h
index bed653e..9ea5b61 100644
--- a/iocore/net/quic/Mock.h
+++ b/iocore/net/quic/Mock.h
@@ -510,7 +510,8 @@ public:
class MockQUICRTTProvider : public QUICRTTProvider
{
- ink_hrtime smoothed_rtt() const
+ ink_hrtime
+ smoothed_rtt() const
{
return HRTIME_MSECONDS(1);
}
diff --git a/iocore/net/quic/QUICCongestionController.cc b/iocore/net/quic/QUICCongestionController.cc
index b748050..2c45aad 100644
--- a/iocore/net/quic/QUICCongestionController.cc
+++ b/iocore/net/quic/QUICCongestionController.cc
@@ -27,20 +27,20 @@
#include "QUICConfig.h"
#define QUICCCDebug(fmt, ...) \
- Debug("quic_cc", "[%" PRIx64 "] " \
- "window: %" PRIu32 " bytes: %" PRIu32 " ssthresh: %" PRIu32 " " fmt, \
+ Debug("quic_cc", \
+ "[%" PRIx64 "] " \
+ "window: %" PRIu32 " bytes: %" PRIu32 " ssthresh: %" PRIu32 " " fmt, \
static_cast<uint64_t>(this->_connection_id), this->_congestion_window, this->_bytes_in_flight, this->_ssthresh, \
##__VA_ARGS__)
#define QUICCCError(fmt, ...) \
- Error("quic_cc", "[%" PRIx64 "] " \
- "window: %" PRIu32 " bytes: %" PRIu32 " ssthresh: %" PRIu32 " " fmt, \
+ Error("quic_cc", \
+ "[%" PRIx64 "] " \
+ "window: %" PRIu32 " bytes: %" PRIu32 " ssthresh: %" PRIu32 " " fmt, \
static_cast<uint64_t>(this->_connection_id), this->_congestion_window, this->_bytes_in_flight, this->_ssthresh, \
##__VA_ARGS__)
-QUICCongestionController::QUICCongestionController() : QUICCongestionController(0)
-{
-}
+QUICCongestionController::QUICCongestionController() : QUICCongestionController(0) {}
QUICCongestionController::QUICCongestionController(QUICConnectionId connection_id) : _connection_id(connection_id)
{
diff --git a/iocore/net/quic/QUICFrame.cc b/iocore/net/quic/QUICFrame.cc
index 428f1e2..36e4974 100644
--- a/iocore/net/quic/QUICFrame.cc
+++ b/iocore/net/quic/QUICFrame.cc
@@ -731,7 +731,8 @@ QUICAckFrame::AckBlockSection::const_iterator::const_iterator(uint8_t index, con
}
// FIXME: something wrong with clang-format?
-const QUICAckFrame::AckBlock &QUICAckFrame::AckBlockSection::const_iterator::operator++()
+const QUICAckFrame::AckBlock &
+QUICAckFrame::AckBlockSection::const_iterator::operator++()
{
++(this->_index);
diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h
index 89a289b..8d8173c 100644
--- a/iocore/net/quic/QUICFrame.h
+++ b/iocore/net/quic/QUICFrame.h
@@ -41,7 +41,7 @@ public:
static QUICFrameType type(const uint8_t *buf);
virtual QUICFrameType type() const;
- virtual size_t size() const = 0;
+ virtual size_t size() const = 0;
virtual void store(uint8_t *buf, size_t *len) const = 0;
virtual void reset(const uint8_t *buf, size_t len);
virtual bool is_protected() const;
diff --git a/iocore/net/quic/QUICFrameGenerator.h b/iocore/net/quic/QUICFrameGenerator.h
index 7c2d40e..f815437 100644
--- a/iocore/net/quic/QUICFrameGenerator.h
+++ b/iocore/net/quic/QUICFrameGenerator.h
@@ -29,6 +29,6 @@ class QUICFrameGenerator
{
public:
virtual ~QUICFrameGenerator(){};
- virtual bool will_generate_frame() = 0;
+ virtual bool will_generate_frame() = 0;
virtual QUICFrameUPtr generate_frame(uint16_t connection_credit, uint16_t maximum_frame_size) = 0;
};
diff --git a/iocore/net/quic/QUICHandshake.cc b/iocore/net/quic/QUICHandshake.cc
index 831da56..540f5ab 100644
--- a/iocore/net/quic/QUICHandshake.cc
+++ b/iocore/net/quic/QUICHandshake.cc
@@ -86,9 +86,7 @@ static constexpr int UDP_MAXIMUM_PAYLOAD_SIZE = 65527;
// TODO: fix size
static constexpr int MAX_HANDSHAKE_MSG_LEN = 65527;
-QUICHandshake::QUICHandshake(QUICConnection *qc, SSL_CTX *ssl_ctx) : QUICHandshake(qc, ssl_ctx, {}, false)
-{
-}
+QUICHandshake::QUICHandshake(QUICConnection *qc, SSL_CTX *ssl_ctx) : QUICHandshake(qc, ssl_ctx, {}, false) {}
QUICHandshake::QUICHandshake(QUICConnection *qc, SSL_CTX *ssl_ctx, QUICStatelessResetToken token, bool stateless_retry)
: QUICApplication(qc),
diff --git a/iocore/net/quic/QUICHandshakeProtocol.cc b/iocore/net/quic/QUICHandshakeProtocol.cc
index d73826a..cea5d48 100644
--- a/iocore/net/quic/QUICHandshakeProtocol.cc
+++ b/iocore/net/quic/QUICHandshakeProtocol.cc
@@ -32,9 +32,7 @@
// QUICPacketProtection
//
-QUICPacketProtection::~QUICPacketProtection()
-{
-}
+QUICPacketProtection::~QUICPacketProtection() {}
void
QUICPacketProtection::set_key(std::unique_ptr<KeyMaterial> km, QUICKeyPhase phase)
diff --git a/iocore/net/quic/QUICHandshakeProtocol.h b/iocore/net/quic/QUICHandshakeProtocol.h
index 3e4649d..e8760d3 100644
--- a/iocore/net/quic/QUICHandshakeProtocol.h
+++ b/iocore/net/quic/QUICHandshakeProtocol.h
@@ -50,15 +50,15 @@ public:
virtual ~QUICHandshakeProtocol(){};
virtual int handshake(uint8_t *out, size_t &out_len, size_t max_out_len, const uint8_t *in, size_t in_len) = 0;
- virtual bool is_handshake_finished() const = 0;
- virtual bool is_ready_to_derive() const = 0;
- virtual bool is_key_derived(QUICKeyPhase key_phase) const = 0;
- virtual int initialize_key_materials(QUICConnectionId cid) = 0;
- virtual int update_key_materials() = 0;
+ virtual bool is_handshake_finished() const = 0;
+ virtual bool is_ready_to_derive() const = 0;
+ virtual bool is_key_derived(QUICKeyPhase key_phase) const = 0;
+ virtual int initialize_key_materials(QUICConnectionId cid) = 0;
+ virtual int update_key_materials() = 0;
virtual bool encrypt(uint8_t *cipher, size_t &cipher_len, size_t max_cipher_len, const uint8_t *plain, size_t plain_len,
- uint64_t pkt_num, const uint8_t *ad, size_t ad_len, QUICKeyPhase phase) const = 0;
+ uint64_t pkt_num, const uint8_t *ad, size_t ad_len, QUICKeyPhase phase) const = 0;
virtual bool decrypt(uint8_t *plain, size_t &plain_len, size_t max_plain_len, const uint8_t *cipher, size_t cipher_len,
- uint64_t pkt_num, const uint8_t *ad, size_t ad_len, QUICKeyPhase phase) const = 0;
+ uint64_t pkt_num, const uint8_t *ad, size_t ad_len, QUICKeyPhase phase) const = 0;
virtual QUICHandshakeMsgType msg_type() const;
protected:
diff --git a/iocore/net/quic/QUICPacket.cc b/iocore/net/quic/QUICPacket.cc
index aea9318..1dfc4ab 100644
--- a/iocore/net/quic/QUICPacket.cc
+++ b/iocore/net/quic/QUICPacket.cc
@@ -489,9 +489,7 @@ QUICPacketShortHeader::store(uint8_t *buf, size_t *len) const
// QUICPacket
//
-QUICPacket::QUICPacket()
-{
-}
+QUICPacket::QUICPacket() {}
QUICPacket::QUICPacket(QUICPacketHeaderUPtr header, ats_unique_buf payload, size_t payload_len)
{
diff --git a/iocore/net/quic/QUICTLS.cc b/iocore/net/quic/QUICTLS.cc
index ec24345..76e9d3b 100644
--- a/iocore/net/quic/QUICTLS.cc
+++ b/iocore/net/quic/QUICTLS.cc
@@ -51,9 +51,7 @@ QUICTLS::QUICTLS(SSL *ssl, NetVConnectionContext_t nvc_ctx, bool stateless)
this->_server_pp = new QUICPacketProtection();
}
-QUICTLS::QUICTLS(SSL *ssl, NetVConnectionContext_t nvc_ctx) : QUICTLS(ssl, nvc_ctx, false)
-{
-}
+QUICTLS::QUICTLS(SSL *ssl, NetVConnectionContext_t nvc_ctx) : QUICTLS(ssl, nvc_ctx, false) {}
QUICTLS::~QUICTLS()
{
diff --git a/iocore/net/quic/test/test_QUICKeyGenerator.cc b/iocore/net/quic/test/test_QUICKeyGenerator.cc
index 1f94296..fd91b20 100644
--- a/iocore/net/quic/test/test_QUICKeyGenerator.cc
+++ b/iocore/net/quic/test/test_QUICKeyGenerator.cc
@@ -59,7 +59,7 @@ TEST_CASE("QUICKeyGenerator", "[quic]")
QUICConnectionId cid = 0x8394c8f03e515708;
uint8_t expected_client_key[] = {0x3a, 0xd0, 0x54, 0x2c, 0x4a, 0x85, 0x84, 0x74,
0x00, 0x63, 0x04, 0x9e, 0x3b, 0x3c, 0xaa, 0xb2};
- uint8_t expected_client_iv[] = {0xd1, 0xfd, 0x26, 0x05, 0x42, 0x75, 0x3a, 0xba, 0x38, 0x58, 0x9b, 0xad};
+ uint8_t expected_client_iv[] = {0xd1, 0xfd, 0x26, 0x05, 0x42, 0x75, 0x3a, 0xba, 0x38, 0x58, 0x9b, 0xad};
std::unique_ptr<KeyMaterial> actual_km = keygen.generate(cid);
@@ -76,7 +76,7 @@ TEST_CASE("QUICKeyGenerator", "[quic]")
QUICConnectionId cid = 0x8394c8f03e515708;
uint8_t expected_server_key[] = {0xbe, 0xe4, 0xc2, 0x4d, 0x2a, 0xf1, 0x33, 0x80,
0xa9, 0xfa, 0x24, 0xa5, 0xe2, 0xba, 0x2c, 0xff};
- uint8_t expected_server_iv[] = {0x25, 0xb5, 0x8e, 0x24, 0x6d, 0x9e, 0x7d, 0x5f, 0xfe, 0x43, 0x23, 0xfe};
+ uint8_t expected_server_iv[] = {0x25, 0xb5, 0x8e, 0x24, 0x6d, 0x9e, 0x7d, 0x5f, 0xfe, 0x43, 0x23, 0xfe};
std::unique_ptr<KeyMaterial> actual_km = keygen.generate(cid);
diff --git a/iocore/net/quic/test/test_QUICLossDetector.cc b/iocore/net/quic/test/test_QUICLossDetector.cc
index b3ee4f0..d898306 100644
--- a/iocore/net/quic/test/test_QUICLossDetector.cc
+++ b/iocore/net/quic/test/test_QUICLossDetector.cc
@@ -138,7 +138,7 @@ TEST_CASE("QUICLossDetector_Loss", "[quic]")
afc->update(pn9, false, true);
ink_hrtime_sleep(HRTIME_MSECONDS(1000));
std::shared_ptr<QUICFrame> x = afc->generate_frame(2048, 2048);
- frame = std::dynamic_pointer_cast<QUICAckFrame>(x);
+ frame = std::dynamic_pointer_cast<QUICAckFrame>(x);
detector.handle_frame(frame);
ink_hrtime_sleep(HRTIME_MSECONDS(5000));
diff --git a/lib/records/I_RecHttp.h b/lib/records/I_RecHttp.h
index 7584f13..f9f069d 100644
--- a/lib/records/I_RecHttp.h
+++ b/lib/records/I_RecHttp.h
@@ -307,7 +307,7 @@ public:
/// Check for QUIC ports.
/// @return @c true if any port in @a ports is an QUIC port.
static bool hasQUIC(Group const &ports ///< Ports to check.
- );
+ );
/// Check for QUIC ports.
/// @return @c true if any global port is an QUIC port.
diff --git a/proxy/hq/HQClientSession.cc b/proxy/hq/HQClientSession.cc
index b8ede45..332bcb0 100644
--- a/proxy/hq/HQClientSession.cc
+++ b/proxy/hq/HQClientSession.cc
@@ -23,9 +23,7 @@
#include "HQClientSession.h"
-HQClientSession::HQClientSession(NetVConnection *vc) : _client_vc(vc)
-{
-}
+HQClientSession::HQClientSession(NetVConnection *vc) : _client_vc(vc) {}
HQClientSession::~HQClientSession()
{
diff --git a/proxy/hq/HQDataFramer.cc b/proxy/hq/HQDataFramer.cc
index 09f55ae..d074a27 100644
--- a/proxy/hq/HQDataFramer.cc
+++ b/proxy/hq/HQDataFramer.cc
@@ -25,9 +25,7 @@
#include "HQDataFramer.h"
#include "HQClientTransaction.h"
-HQDataFramer::HQDataFramer(HQClientTransaction *transaction, VIO *source) : _transaction(transaction), _source_vio(source)
-{
-}
+HQDataFramer::HQDataFramer(HQClientTransaction *transaction, VIO *source) : _transaction(transaction), _source_vio(source) {}
HQFrameUPtr
HQDataFramer::generate_frame(uint16_t max_size)
diff --git a/proxy/hq/HQFrame.cc b/proxy/hq/HQFrame.cc
index f34ac78..3df902c 100644
--- a/proxy/hq/HQFrame.cc
+++ b/proxy/hq/HQFrame.cc
@@ -75,9 +75,7 @@ HQFrame::HQFrame(const uint8_t *buf, size_t buf_len)
this->_payload_offset = length_field_length + 2;
}
-HQFrame::HQFrame(HQFrameType type) : _type(type)
-{
-}
+HQFrame::HQFrame(HQFrameType type) : _type(type) {}
uint64_t
HQFrame::total_length() const
@@ -120,9 +118,7 @@ HQFrame::reset(const uint8_t *buf, size_t len)
//
// UNKNOWN Frame
//
-HQUnknownFrame::HQUnknownFrame(const uint8_t *buf, size_t buf_len) : HQFrame(buf, buf_len), _buf(buf), _buf_len(buf_len)
-{
-}
+HQUnknownFrame::HQUnknownFrame(const uint8_t *buf, size_t buf_len) : HQFrame(buf, buf_len), _buf(buf), _buf_len(buf_len) {}
void
HQUnknownFrame::store(uint8_t *buf, size_t *len) const
diff --git a/proxy/hq/HQHeaderVIOAdaptor.cc b/proxy/hq/HQHeaderVIOAdaptor.cc
index 366e865..0c44d81 100644
--- a/proxy/hq/HQHeaderVIOAdaptor.cc
+++ b/proxy/hq/HQHeaderVIOAdaptor.cc
@@ -24,9 +24,7 @@
#include "HQHeaderVIOAdaptor.h"
#include "I_VIO.h"
-HQHeaderVIOAdaptor::HQHeaderVIOAdaptor(VIO *sink) : _sink_vio(sink)
-{
-}
+HQHeaderVIOAdaptor::HQHeaderVIOAdaptor(VIO *sink) : _sink_vio(sink) {}
std::vector<HQFrameType>
HQHeaderVIOAdaptor::interests()
diff --git a/proxy/hq/HQSessionAccept.cc b/proxy/hq/HQSessionAccept.cc
index 75d8982..9906a45 100644
--- a/proxy/hq/HQSessionAccept.cc
+++ b/proxy/hq/HQSessionAccept.cc
@@ -33,9 +33,7 @@ HQSessionAccept::HQSessionAccept(const HttpSessionAccept::Options &_o) : Session
SET_HANDLER(&HQSessionAccept::mainEvent);
}
-HQSessionAccept::~HQSessionAccept()
-{
-}
+HQSessionAccept::~HQSessionAccept() {}
bool
HQSessionAccept::accept(NetVConnection *netvc, MIOBuffer *iobuf, IOBufferReader *reader)
diff --git a/proxy/hq/HQStreamDataVIOAdaptor.cc b/proxy/hq/HQStreamDataVIOAdaptor.cc
index 5df1190..675b3c3 100644
--- a/proxy/hq/HQStreamDataVIOAdaptor.cc
+++ b/proxy/hq/HQStreamDataVIOAdaptor.cc
@@ -24,9 +24,7 @@
#include "HQStreamDataVIOAdaptor.h"
#include "I_VIO.h"
-HQStreamDataVIOAdaptor::HQStreamDataVIOAdaptor(VIO *sink) : _sink_vio(sink)
-{
-}
+HQStreamDataVIOAdaptor::HQStreamDataVIOAdaptor(VIO *sink) : _sink_vio(sink) {}
std::vector<HQFrameType>
HQStreamDataVIOAdaptor::interests()
--
To stop receiving notification emails like this one, please contact
zwoop@apache.org.