From 6fa42af5674ab684b45f9745dc68b0d3fa0605b8 Mon Sep 17 00:00:00 2001 From: asynts Date: Mon, 11 Jan 2021 13:06:51 +0100 Subject: [PATCH] Everywhere: Replace a bundle of dbg with dbgln. These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect. The modifications in this commit were automatically made using the following command: find . -name '*.h' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \; --- Libraries/LibCrypto/ASN1/DER.h | 4 ++-- Libraries/LibCrypto/PK/Code/EMSA_PSS.h | 2 +- Libraries/LibCrypto/PK/RSA.h | 2 +- Libraries/LibRegex/RegexDebug.h | 2 +- Libraries/LibTLS/TLSv12.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Libraries/LibCrypto/ASN1/DER.h b/Libraries/LibCrypto/ASN1/DER.h index 0c4c63e2f16..47334724d34 100644 --- a/Libraries/LibCrypto/ASN1/DER.h +++ b/Libraries/LibCrypto/ASN1/DER.h @@ -321,11 +321,11 @@ static inline bool der_decode_sequence(const u8* in, size_t in_length, ASN1::Lis case ASN1::Kind::Integer: z = in_length; if (!der_decode_integer(in + x, z, *(UnsignedBigInteger*)data)) { - dbg() << "could not decode an integer"; + dbgln("could not decode an integer"); return false; } if (!der_length_integer((UnsignedBigInteger*)data, &z)) { - dbg() << "could not figure out the length"; + dbgln("could not figure out the length"); return false; } break; diff --git a/Libraries/LibCrypto/PK/Code/EMSA_PSS.h b/Libraries/LibCrypto/PK/Code/EMSA_PSS.h index d12ff058b0f..95e6e58008d 100644 --- a/Libraries/LibCrypto/PK/Code/EMSA_PSS.h +++ b/Libraries/LibCrypto/PK/Code/EMSA_PSS.h @@ -60,7 +60,7 @@ public: AK::fill_with_random(salt, SaltLength); if (em_length < hash_length + SaltLength + 2) { - dbg() << "Ooops...encoding error"; + dbgln("Ooops...encoding error"); return; } diff --git a/Libraries/LibCrypto/PK/RSA.h b/Libraries/LibCrypto/PK/RSA.h index c33a90ec89c..1808a653af4 100644 --- a/Libraries/LibCrypto/PK/RSA.h +++ b/Libraries/LibCrypto/PK/RSA.h @@ -131,7 +131,7 @@ public: p = NumberTheory::random_big_prime(bits / 2); q = NumberTheory::random_big_prime(bits / 2); lambda = NumberTheory::LCM(p.minus(1), q.minus(1)); - dbg() << "checking combination p=" << p << ", q=" << q << ", lambda=" << lambda.length(); + dbgln("checking combination p={}, q={}, lambda={}", p, q, lambda.length()); } while (!(NumberTheory::GCD(e, lambda) == 1)); auto n = p.multiplied_by(q); diff --git a/Libraries/LibRegex/RegexDebug.h b/Libraries/LibRegex/RegexDebug.h index f49c190c2fc..c90c587d29e 100644 --- a/Libraries/LibRegex/RegexDebug.h +++ b/Libraries/LibRegex/RegexDebug.h @@ -64,7 +64,7 @@ public: for (;;) { auto* opcode = bytecode.get_opcode(state); if (!opcode) { - dbg() << "Wrong opcode... failed!"; + dbgln("Wrong opcode... failed!"); return; } diff --git a/Libraries/LibTLS/TLSv12.h b/Libraries/LibTLS/TLSv12.h index ea335f070e9..219b9f55d41 100644 --- a/Libraries/LibTLS/TLSv12.h +++ b/Libraries/LibTLS/TLSv12.h @@ -274,7 +274,7 @@ public: void set_sni(const StringView& sni) { if (m_context.is_server || m_context.critical_error || m_context.connection_status != ConnectionStatus::Disconnected) { - dbg() << "invalid state for set_sni"; + dbgln("invalid state for set_sni"); return; } m_context.SNI = sni;