static int
remove_from_boot_order(uint16_t num)
{
- efi_variable_t *boot_order;
+ efi_variable_t *boot_order = NULL;
uint64_t new_data_size;
uint16_t *new_data, *old_data;
int old_i,new_i;
boot order. Simply copy the array, skipping the
entry we're deleting.
*/
- old_data = (uint16_t *)&(boot_order->data);
+ old_data = (uint16_t *)(boot_order->data);
/* Start with the same size */
new_data_size = boot_order->data_size - sizeof (*new_data);
new_data = malloc(new_data_size);
show_boot_order()
{
int rc;
- efi_variable_t *boot_order;
+ efi_variable_t *boot_order = NULL;
uint16_t *data;
rc = read_boot_order(&boot_order);