Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: net/quic/crypto/chacha20_poly1305_encrypter_test.cc

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/chacha20_poly1305_encrypter_nss.cc ('k') | net/quic/crypto/channel_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/chacha20_poly1305_encrypter_test.cc
diff --git a/net/quic/crypto/chacha20_poly1305_encrypter_test.cc b/net/quic/crypto/chacha20_poly1305_encrypter_test.cc
index 0273b27933c3f2620cc673e83c6ddd4e14430eb2..4f33337d6f3875c428a7d247fe33e6fb4384a9c5 100644
--- a/net/quic/crypto/chacha20_poly1305_encrypter_test.cc
+++ b/net/quic/crypto/chacha20_poly1305_encrypter_test.cc
@@ -50,7 +50,7 @@ QuicData* EncryptWithNonce(ChaCha20Poly1305Encrypter* encrypter,
if (!encrypter->Encrypt(nonce, associated_data, plaintext,
reinterpret_cast<unsigned char*>(ciphertext.get()))) {
- return NULL;
+ return nullptr;
}
return new QuicData(ciphertext.release(), ciphertext_size, true);
@@ -62,7 +62,7 @@ TEST(ChaCha20Poly1305EncrypterTest, Encrypt) {
return;
}
- for (size_t i = 0; test_vectors[i].key != NULL; i++) {
+ for (size_t i = 0; test_vectors[i].key != nullptr; i++) {
// Decode the test vector.
string key;
string pt;
@@ -80,8 +80,8 @@ TEST(ChaCha20Poly1305EncrypterTest, Encrypt) {
scoped_ptr<QuicData> encrypted(EncryptWithNonce(
&encrypter, iv,
// This deliberately tests that the encrypter can handle an AAD that
- // is set to NULL, as opposed to a zero-length, non-NULL pointer.
- StringPiece(aad.length() ? aad.data() : NULL, aad.length()), pt));
+ // is set to nullptr, as opposed to a zero-length, non-nullptr pointer.
+ StringPiece(aad.length() ? aad.data() : nullptr, aad.length()), pt));
ASSERT_TRUE(encrypted.get());
test::CompareCharArraysWithHexError("ciphertext", encrypted->data(),
« no previous file with comments | « net/quic/crypto/chacha20_poly1305_encrypter_nss.cc ('k') | net/quic/crypto/channel_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698