summaryrefslogtreecommitdiffstats
path: root/libtests/rc4.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-05-20 14:24:10 +0200
committerm-holger <m-holger@kubitscheck.org>2023-05-20 16:41:40 +0200
commit41ec7eda54e2263eeb1aee4c3a0616c9c2777fb7 (patch)
treecb151a0c0d9eaf79f3f075879751cc89f98d6f4e /libtests/rc4.cc
parentd0682f0f609e979ba085d93a1a0d8e0559f739bb (diff)
downloadqpdf-41ec7eda54e2263eeb1aee4c3a0616c9c2777fb7.tar.zst
Use auto when initialializing with new
Diffstat (limited to 'libtests/rc4.cc')
-rw-r--r--libtests/rc4.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libtests/rc4.cc b/libtests/rc4.cc
index ca4af91d..300c6201 100644
--- a/libtests/rc4.cc
+++ b/libtests/rc4.cc
@@ -41,7 +41,7 @@ main(int argc, char* argv[])
char* outfilename = argv[3];
unsigned int hexkeylen = QIntC::to_uint(strlen(hexkey));
unsigned int keylen = hexkeylen / 2;
- unsigned char* key = new unsigned char[keylen + 1];
+ auto* key = new unsigned char[keylen + 1];
key[keylen] = '\0';
FILE* infile = QUtil::safe_fopen(infilename, "rb");
@@ -56,9 +56,9 @@ main(int argc, char* argv[])
}
FILE* outfile = QUtil::safe_fopen(outfilename, "wb");
- Pl_StdioFile* out = new Pl_StdioFile("stdout", outfile);
+ auto* out = new Pl_StdioFile("stdout", outfile);
// Use a small buffer size (64) for testing
- Pl_RC4* rc4 = new Pl_RC4("rc4", out, key, QIntC::to_int(keylen), 64U);
+ auto* rc4 = new Pl_RC4("rc4", out, key, QIntC::to_int(keylen), 64U);
delete[] key;
// 64 < buffer size < 512, buffer_size is not a power of 2 for testing