diff options
author | Pali Rohár <pali@kernel.org> | 2021-08-02 15:18:30 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-01 16:06:43 -0400 |
commit | 3a641e2f1e0a12b59825f9a1ff15f3d90cbcdf3b (patch) | |
tree | 0c31ee5c2fd5f4f2df10b418bb79d6b95c7addeb | |
parent | f146398624feb8821ccd11c66f2b3e130e6a6b0f (diff) | |
download | u-boot-3a641e2f1e0a12b59825f9a1ff15f3d90cbcdf3b.tar.gz |
efi_loader: Use directly version_string variable
Macro U_BOOT_VERSION_STRING is already stored in variable version_string.
So use directly this variable instead of storing U_BOOT_VERSION_STRING into
temporary variable.
Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r-- | lib/efi_loader/efi_tcg2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index 35e69b9112..35d1c023d7 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -1321,10 +1321,10 @@ out: */ static efi_status_t efi_append_scrtm_version(struct udevice *dev) { - u8 ver[] = U_BOOT_VERSION_STRING; efi_status_t ret; - ret = tcg2_measure_event(dev, 0, EV_S_CRTM_VERSION, sizeof(ver), ver); + ret = tcg2_measure_event(dev, 0, EV_S_CRTM_VERSION, + strlen(version_string), (u8 *)version_string); return ret; } |