OpenVPN
Functions
integer.h File Reference
#include "error.h"
Include dependency graph for integer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static int max_int (int x, int y)
 
static int min_int (int x, int y)
 
static int constrain_int (int x, int min, int max)
 
static int modulo_subtract (int x, int y, int mod)
 
static int modulo_add (int x, int y, int mod)
 
static size_t adjust_power_of_2 (size_t u)
 
static int index_verify (int index, int size, const char *file, int line)
 

Function Documentation

◆ adjust_power_of_2()

static size_t adjust_power_of_2 ( size_t  u)
inlinestatic

Definition at line 126 of file integer.h.

References ASSERT.

Referenced by argv_grow(), hash_init(), and mbuf_init().

◆ constrain_int()

static int constrain_int ( int  x,
int  min,
int  max 
)
inlinestatic

◆ index_verify()

static int index_verify ( int  index,
int  size,
const char *  file,
int  line 
)
inlinestatic

Definition at line 140 of file integer.h.

References M_FATAL, and msg.

◆ max_int()

static int max_int ( int  x,
int  y 
)
inlinestatic

◆ min_int()

static int min_int ( int  x,
int  y 
)
inlinestatic

◆ modulo_add()

static int modulo_add ( int  x,
int  y,
int  mod 
)
inlinestatic

Definition at line 106 of file integer.h.

References ASSERT.

Referenced by fragment_list_get_buf(), fragment_outgoing(), and log_index().

◆ modulo_subtract()

static int modulo_subtract ( int  x,
int  y,
int  mod 
)
inlinestatic

Definition at line 91 of file integer.h.

References ASSERT.

Referenced by fragment_list_get_buf().