From f409a94a6906a3bea00c67b68b748e0912bf767c Mon Sep 17 00:00:00 2001 From: krw Date: Tue, 17 Jan 2023 23:56:51 +0000 Subject: [PATCH] Nuke unused MAXIMUM(). Add ROUNDUP() and ROUNDDOWN(). --- sbin/disklabel/editor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index c148f6b69cd..43687f23405 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.389 2023/01/16 16:49:16 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.390 2023/01/17 23:56:51 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -42,7 +42,8 @@ #include "extern.h" #include "pathnames.h" -#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) +#define ROUNDUP(_s, _a) ((((_s) + (_a) - 1) / (_a)) * (_a)) +#define ROUNDDOWN(_s, _a) (((_s) / (_a)) * (_a)) /* flags for getuint64() */ #define DO_CONVERSIONS 0x00000001 -- 2.20.1