From f217f1c6f03fdbe5304486d46749c92114617d00 Mon Sep 17 00:00:00 2001 From: bzt Date: Sun, 15 Aug 2021 13:31:46 +0200 Subject: [PATCH] Added parenthesis in macros --- dist/bootboot.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/bootboot.h b/dist/bootboot.h index e157a61..406023f 100644 --- a/dist/bootboot.h +++ b/dist/bootboot.h @@ -83,10 +83,10 @@ typedef struct { uint64_t ptr; uint64_t size; } _pack MMapEnt; -#define MMapEnt_Ptr(a) (a->ptr) -#define MMapEnt_Size(a) (a->size & 0xFFFFFFFFFFFFFFF0) -#define MMapEnt_Type(a) (a->size & 0xF) -#define MMapEnt_IsFree(a) ((a->size&0xF)==1) +#define MMapEnt_Ptr(a) ((a)->ptr) +#define MMapEnt_Size(a) ((a)->size & 0xFFFFFFFFFFFFFFF0) +#define MMapEnt_Type(a) ((a)->size & 0xF) +#define MMapEnt_IsFree(a) (((a)->size&0xF)==1) #define MMAP_USED 0 /* don't use. Reserved or unknown regions */ #define MMAP_FREE 1 /* usable memory */ @@ -141,7 +141,7 @@ typedef struct { MMapEnt mmap; /* use like this: * MMapEnt *mmap_ent = &bootboot.mmap; mmap_ent++; - * until you reach bootboot->size */ + * until you reach bootboot->size, while(mmap_ent < bootboot + bootboot->size) */ } _pack BOOTBOOT; #ifdef _MSC_VER