diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-09-02 10:09:09 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2020-09-03 12:47:33 +0200 |
commit | ed943cc934a82fd78102f0df2084a8f3c556716f (patch) | |
tree | 4ecdd681a510997b7584fe3efbd09a5e70316b25 /tests/qtest/tpm-tests.c | |
parent | df1a312fea58bb3f83b5d7eba0946d43cb16675f (diff) | |
download | qemu-ed943cc934a82fd78102f0df2084a8f3c556716f.zip qemu-ed943cc934a82fd78102f0df2084a8f3c556716f.tar.gz qemu-ed943cc934a82fd78102f0df2084a8f3c556716f.tar.bz2 |
tests/qtest/tpm: Declare input buffers const and static
The functions using these arrays expect a "const unsigned char *"
argument, it is safe to declare these as 'static const'.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200902080909.161034-1-philmd@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/tpm-tests.c')
-rw-r--r-- | tests/qtest/tpm-tests.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qtest/tpm-tests.c b/tests/qtest/tpm-tests.c index a2f2838..70c80f8 100644 --- a/tests/qtest/tpm-tests.c +++ b/tests/qtest/tpm-tests.c @@ -59,7 +59,7 @@ void tpm_test_swtpm_test(const char *src_tpm_path, tx_func *tx, tpm_util_startup(s, tx); tpm_util_pcrextend(s, tx); - unsigned char tpm_pcrread_resp[] = + static const unsigned char tpm_pcrread_resp[] = "\x80\x01\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00" "\x00\x01\x00\x0b\x03\x00\x04\x00\x00\x00\x00\x01\x00\x20\xf6\x85" "\x98\xe5\x86\x8d\xe6\x8b\x97\x29\x99\x60\xf2\x71\x7d\x17\x67\x89" @@ -107,7 +107,7 @@ void tpm_test_swtpm_migration_test(const char *src_tpm_path, tpm_util_startup(src_qemu, tx); tpm_util_pcrextend(src_qemu, tx); - unsigned char tpm_pcrread_resp[] = + static const unsigned char tpm_pcrread_resp[] = "\x80\x01\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00" "\x00\x01\x00\x0b\x03\x00\x04\x00\x00\x00\x00\x01\x00\x20\xf6\x85" "\x98\xe5\x86\x8d\xe6\x8b\x97\x29\x99\x60\xf2\x71\x7d\x17\x67\x89" |