aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_encryption.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-07-26 13:37:50 +0200
committerm-holger <m-holger@kubitscheck.org>2022-07-26 14:40:13 +0200
commit073808aa50f0c78e2d6fea4f56f0b814b314eb42 (patch)
treee2598b807a59cab41825d3b36f33dce45c7ba4de /libqpdf/QPDF_encryption.cc
parentd27edd54c4b077de66c40f681ff5d0e266952884 (diff)
downloadqpdf-073808aa50f0c78e2d6fea4f56f0b814b314eb42.tar.zst
Code tidy : replace 0 with nullptr or true
Diffstat (limited to 'libqpdf/QPDF_encryption.cc')
-rw-r--r--libqpdf/QPDF_encryption.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/QPDF_encryption.cc b/libqpdf/QPDF_encryption.cc
index 8c35b992..266907a8 100644
--- a/libqpdf/QPDF_encryption.cc
+++ b/libqpdf/QPDF_encryption.cc
@@ -149,8 +149,8 @@ QPDF::trim_user_password(std::string& user_password)
}
char const* p1 = cstr;
- char const* p2 = 0;
- while ((p2 = strchr(p1, '\x28')) != 0) {
+ char const* p2 = nullptr;
+ while ((p2 = strchr(p1, '\x28')) != nullptr) {
size_t idx = toS(p2 - cstr);
if (memcmp(p2, padding_string, len - idx) == 0) {
user_password = user_password.substr(0, idx);
@@ -218,7 +218,7 @@ process_with_aes(
std::string const& data,
size_t outlength = 0,
unsigned int repetitions = 1,
- unsigned char const* iv = 0,
+ unsigned char const* iv = nullptr,
size_t iv_length = 0)
{
Pl_Buffer buffer("buffer");