Skip to content

Commit

Permalink
fix FDB_ALIGN macro expansion errors
Browse files Browse the repository at this point in the history
  • Loading branch information
guoweilkd committed Oct 12, 2023
1 parent d2cae60 commit 4aa2dbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/fdb_low_lvl.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
/* Return the most contiguous size aligned at specified width. RT_ALIGN(13, 4)
* would return 16.
*/
#define FDB_ALIGN(size, align) ((size + align - 1) - ((size + align -1) % align))
#define FDB_ALIGN(size, align) (((size) + (align) - 1) - (((size) + (align) -1) % (align)))
/* align by write granularity */
#define FDB_WG_ALIGN(size) (FDB_ALIGN(size, (FDB_WRITE_GRAN + 7)/8))
#define FDB_WG_ALIGN(size) (FDB_ALIGN(size, ((FDB_WRITE_GRAN + 7)/8)))
/**
* Return the down number of aligned at specified width. RT_ALIGN_DOWN(13, 4)
* would return 12.
Expand Down

0 comments on commit 4aa2dbc

Please sign in to comment.