diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2023-01-17 23:56:52 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2023-01-17 23:56:52 +0000 |
commit | bb4a4bca7998a39cf9098a5b5fd323e9f154fc23 (patch) | |
tree | 9187bbc006733b3eddd7b9946182365c8fa5914f /sbin/disklabel/editor.c | |
parent | 9939f8e8bd699aa3aad74eeb90bcb4e4cefa52e2 (diff) |
Nuke unused MAXIMUM(). Add ROUNDUP() and ROUNDDOWN().
Diffstat (limited to 'sbin/disklabel/editor.c')
-rw-r--r-- | sbin/disklabel/editor.c | 5 |
1 files 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 <millert@openbsd.org> @@ -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 |