summaryrefslogtreecommitdiff
path: root/util/cbfstool/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/common.h')
-rw-r--r--util/cbfstool/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index 02a1076488..0284742cb4 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -47,6 +47,13 @@ extern int verbose;
#define unused __attribute__((unused))
+static inline uint32_t align_up(uint32_t value, uint32_t align)
+{
+ if (value % align)
+ value += align - (value % align);
+ return value;
+}
+
/* Buffer and file I/O */
struct buffer {
char *name;