Skip to content

Commit

Permalink
efi_loader: efi_size_in_pages() missing parentheses
Browse files Browse the repository at this point in the history
Add parentheses around size to avoid possible operator precedence problems.

Signed-off-by: Heinrich Schuchardt <[email protected]>
  • Loading branch information
xypron committed Jan 20, 2021
1 parent d56013d commit 0a7e516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/efi_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp);
* @size: size in bytes
* Return: size in pages
*/
#define efi_size_in_pages(size) ((size + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT)
#define efi_size_in_pages(size) (((size) + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT)
/* Generic EFI memory allocator, call this to get memory */
void *efi_alloc(uint64_t len, int memory_type);
/* More specific EFI memory allocator, called by EFI payloads */
Expand Down

0 comments on commit 0a7e516

Please sign in to comment.