diff options
author | m-holger <m-holger@kubitscheck.org> | 2023-05-20 13:46:50 +0200 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2023-05-20 16:41:36 +0200 |
commit | d0682f0f609e979ba085d93a1a0d8e0559f739bb (patch) | |
tree | 53d0ef2d0be8ee1167c8a59f86bda1b3cdba7f53 /libtests/aes.cc | |
parent | e28f4efb00d5040fa71532d76e63aa7ade105c99 (diff) | |
download | qpdf-d0682f0f609e979ba085d93a1a0d8e0559f739bb.tar.zst |
Use nullptr instead of 0 or NULL
Diffstat (limited to 'libtests/aes.cc')
-rw-r--r-- | libtests/aes.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libtests/aes.cc b/libtests/aes.cc index 4541fffe..5ae8152a 100644 --- a/libtests/aes.cc +++ b/libtests/aes.cc @@ -29,9 +29,9 @@ main(int argc, char* argv[]) { bool encrypt = true; bool cbc_mode = true; - char* hexkey = 0; - char* infilename = 0; - char* outfilename = 0; + char* hexkey = nullptr; + char* infilename = nullptr; + char* outfilename = nullptr; bool zero_iv = false; bool static_iv = false; bool disable_padding = false; @@ -65,7 +65,7 @@ main(int argc, char* argv[]) usage(); } } - if (outfilename == 0) { + if (outfilename == nullptr) { usage(); } @@ -81,14 +81,14 @@ main(int argc, char* argv[]) t[1] = hexkey[i + 1]; t[2] = '\0'; - long val = strtol(t, 0, 16); + long val = strtol(t, nullptr, 16); key[i / 2] = static_cast<unsigned char>(val); } Pl_StdioFile* out = new Pl_StdioFile("stdout", outfile); Pl_AES_PDF* aes = new Pl_AES_PDF("aes_128_cbc", out, encrypt, key, keylen); delete[] key; - key = 0; + key = nullptr; if (!cbc_mode) { aes->disableCBC(); } |