From a16e5dce59d8cf50b1262e3d2358b556095a4e96 Mon Sep 17 00:00:00 2001 From: Daniel Jared Dominguez Date: Mon, 7 Jul 2014 14:09:15 -0500 Subject: [PATCH] data_size in construct_boot_order/set_boot_order is of type size_t, so fix a couple of comparisons involving it. Signed-off-by: Daniel Jared Dominguez --- src/efibootmgr/efibootmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c index a59d071..ba5f54f 100644 --- a/src/efibootmgr/efibootmgr.c +++ b/src/efibootmgr/efibootmgr.c @@ -566,7 +566,7 @@ construct_boot_order(char *bootorder, int keep, size_t data_size = 0; rc = parse_boot_order(bootorder, (uint16_t **)&data, &data_size); - if (rc < 0 || data_size <= 0) + if (rc < 0 || data_size == 0) return rc; if (!keep) { @@ -631,7 +631,7 @@ set_boot_order(int keep_old_entries) rc = construct_boot_order(opts.bootorder, keep_old_entries, (uint16_t **)&data, &data_size); - if (rc < 0 || data_size < 0) + if (rc < 0 || data_size == 0) return rc; return efi_set_variable(EFI_GLOBAL_GUID, "BootOrder", data, data_size, -- 2.11.0