1/* 2 * Copyright 2013, Axel D��rfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef UTILITY_H 6#define UTILITY_H 7 8 9#include <SupportDefs.h> 10 11 12static inline off_t 13round_down(off_t a, uint32 b) 14{ 15 return a / b * b; 16} 17 18 19static inline off_t 20round_up(off_t a, uint32 b) 21{ 22 return round_down(a + b - 1, b); 23} 24 25 26#endif // UTILITY_H 27