aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-15 17:18:48 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-15 17:18:48 +0200
commit955fe812dcf3a453936685be78df5c1fcc9ad26b (patch)
treeeb572d7d3def0d2724ff1fd344c953b1c2d82b0b /util.h
parent2f4f29c5a7fb7e252568d1f10d87d287bc25b1f2 (diff)
downloadpasst-955fe812dcf3a453936685be78df5c1fcc9ad26b.tar
passt-955fe812dcf3a453936685be78df5c1fcc9ad26b.tar.gz
passt-955fe812dcf3a453936685be78df5c1fcc9ad26b.tar.bz2
passt-955fe812dcf3a453936685be78df5c1fcc9ad26b.tar.lz
passt-955fe812dcf3a453936685be78df5c1fcc9ad26b.tar.xz
passt-955fe812dcf3a453936685be78df5c1fcc9ad26b.tar.zst
passt-955fe812dcf3a453936685be78df5c1fcc9ad26b.zip
util: Define ROUND_UP()
...not actually used, just for completeness, as ROUND_DOWN() is defined. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.h b/util.h
index 9edf041..a2ed791 100644
--- a/util.h
+++ b/util.h
@@ -26,6 +26,8 @@ void debug(const char *format, ...);
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#define ROUND_DOWN(x, y) ((x) & ~((y) - 1))
+#define ROUND_UP(x, y) (((x) + (y) - 1) & ~((y) - 1))
+
#define SWAP(a, b) \
do { \