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

Unified Diff: net/quic/crypto/chacha20_poly1305_decrypter_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
Index: net/quic/crypto/chacha20_poly1305_decrypter_test.cc
diff --git a/net/quic/crypto/chacha20_poly1305_decrypter_test.cc b/net/quic/crypto/chacha20_poly1305_decrypter_test.cc
index 1825187bb33d51a53e1cc4c73ceab953fe11f762..e83acc09d66511cbeb61f93685e523dacc6dc451 100644
--- a/net/quic/crypto/chacha20_poly1305_decrypter_test.cc
+++ b/net/quic/crypto/chacha20_poly1305_decrypter_test.cc
@@ -80,7 +80,7 @@ QuicData* DecryptWithNonce(ChaCha20Poly1305Decrypter* decrypter,
if (!decrypter->Decrypt(nonce, associated_data, ciphertext,
reinterpret_cast<unsigned char*>(plaintext.get()),
&plaintext_size)) {
- return NULL;
+ return nullptr;
}
return new QuicData(plaintext.release(), plaintext_size, true);
}
@@ -91,7 +91,7 @@ TEST(ChaCha20Poly1305DecrypterTest, Decrypt) {
return;
}
- for (size_t i = 0; test_vectors[i].key != NULL; i++) {
+ for (size_t i = 0; test_vectors[i].key != nullptr; i++) {
// If not present then decryption is expected to fail.
bool has_pt = test_vectors[i].pt;
@@ -114,8 +114,8 @@ TEST(ChaCha20Poly1305DecrypterTest, Decrypt) {
scoped_ptr<QuicData> decrypted(DecryptWithNonce(
&decrypter, iv,
// This deliberately tests that the decrypter 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()), ct));
+ // is set to nullptr, as opposed to a zero-length, non-nullptr pointer.
+ StringPiece(aad.length() ? aad.data() : nullptr, aad.length()), ct));
if (!decrypted.get()) {
EXPECT_FALSE(has_pt);
continue;
« no previous file with comments | « net/quic/crypto/chacha20_poly1305_decrypter_nss.cc ('k') | net/quic/crypto/chacha20_poly1305_encrypter_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698