From b84444b680e453ee2c6223552847a9f48a0a004a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 5 Feb 2020 19:43:20 +0100 Subject: [PATCH] archive/iso9660: rewrite the macro CEILING as function --- src/archive/plugins/Iso9660ArchivePlugin.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx index 8e698ae4d..af4b02aee 100644 --- a/src/archive/plugins/Iso9660ArchivePlugin.cxx +++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx @@ -36,7 +36,11 @@ #include -#define CEILING(x, y) ((x+(y-1))/y) +static constexpr size_t +CEILING(size_t x, size_t y) noexcept +{ + return (x + y - 1) / y; +} struct Iso9660 { iso9660_t *const iso;