cryptodisk: Add macro GRUB_TYPE_BITS() to replace some literals

The new macro GRUB_TYPE_BITS(type) returns the number of bits
allocated for type.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Glenn Washburn authored and Daniel Kiper committed 2020-12-12 01:19:04 +01:00
1 parent 40abe8576a
commit 3e5f7f5112
2 files changed
+6 -3

No files matched your search

+2
View File
@@ -80,6 +80,8 @@
# define GRUB_CHAR_BIT __CHAR_BIT__
#endif
#define GRUB_TYPE_BITS(type) (sizeof(type) * GRUB_CHAR_BIT)
/* Define various wide integers. */
typedef signed char grub_int8_t;
typedef short grub_int16_t;