Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ws_roundup.h
Go to the documentation of this file.
1
10#ifndef __WS_ROUNDUP_H__
11#define __WS_ROUNDUP_H__
12
13/*
14 * Round up to various powers of 2.
15 */
16#define WS_ROUNDUP_2(n) (((n) + ((unsigned)(2U-1U))) & (~((unsigned)(2U-1U))))
17#define WS_ROUNDUP_4(n) (((n) + ((unsigned)(4U-1U))) & (~((unsigned)(4U-1U))))
18#define WS_ROUNDUP_8(n) (((n) + ((unsigned)(8U-1U))) & (~((unsigned)(8U-1U))))
19#define WS_ROUNDUP_16(n) (((n) + ((unsigned)(16U-1U))) & (~((unsigned)(16U-1U))))
20#define WS_ROUNDUP_32(n) (((n) + ((unsigned)(32U-1U))) & (~((unsigned)(32U-1U))))
21
22#endif /* __WS_ROUNDUP_H__ */