Skip to content

Commit

Permalink
Fix wrong if condition in efi_variable_get_data
Browse files Browse the repository at this point in the history
The wrong if condition in efi_variable_get_data result in empty value of printing variable from --import.
Fix #254

Signed-off-by: sherlock-zhouyh <[email protected]>
  • Loading branch information
sherlock-zhouyh authored and vathpela committed Jan 29, 2024
1 parent 573be47 commit 8ff781e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ efi_variable_set_data(efi_variable_t *var, uint8_t *data, size_t size)
ssize_t NONNULL(1, 2, 3) PUBLIC
efi_variable_get_data(efi_variable_t *var, uint8_t **data, size_t *size)
{
if (var->data || !var->data_size) {
if (!var->data || !var->data_size) {
errno = ENOENT;
return -1;
}
Expand Down

0 comments on commit 8ff781e

Please sign in to comment.