diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-08 20:52:38 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-12-11 16:05:40 +0100 |
commit | 234519ae6d6821ae5e83bcddb211905ef4de5700 (patch) | |
tree | 5335ad6ea093f0829bb871c2cbf83b354e53d402 /src/boot | |
parent | 4a0e9289bf443fec9fc56af25f90e2a100ba7a41 (diff) | |
download | systemd-234519ae6d6821ae5e83bcddb211905ef4de5700.tar.gz |
tree-wide: drop a few == NULL and != NULL comparison
Our CODING_STYLE suggests not comparing with NULL, but relying on C's
downgrade-to-bool feature for that. Fix up some code to match these
guidelines. (This is not comprehensive, the coccinelle output for this
is unfortunately kinda borked)
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/efi/measure.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/boot/efi/measure.c b/src/boot/efi/measure.c index 94823587e8..be4fea84a2 100644 --- a/src/boot/efi/measure.c +++ b/src/boot/efi/measure.c @@ -201,7 +201,7 @@ static EFI_STATUS tpm1_measure_to_pcr_and_event_log(const EFI_TCG *tcg, UINT32 p tcg_event = AllocateZeroPool(desc_len + sizeof(TCG_PCR_EVENT)); - if (tcg_event == NULL) + if (!tcg_event) return EFI_OUT_OF_RESOURCES; tcg_event->EventSize = desc_len; @@ -255,7 +255,7 @@ static EFI_STATUS tpm2_measure_to_pcr_and_event_log(const EFI_TCG2 *tcg, UINT32 tcg_event = AllocateZeroPool(sizeof(*tcg_event) - sizeof(tcg_event->Event) + desc_len + 1); - if (tcg_event == NULL) + if (!tcg_event) return EFI_OUT_OF_RESOURCES; tcg_event->Size = sizeof(*tcg_event) - sizeof(tcg_event->Event) + desc_len + 1; |