The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions
section.c File Reference

Comparison functions for sections. More...

#include <freeradius-devel/server/section.h>
#include <freeradius-devel/server/cf_util.h>
+ Include dependency graph for section.c:

Go to the source code of this file.

Macros

#define IDENT_ANY_CMP(_a, _b)    (((_a) == CF_IDENT_ANY) < ((_b) == CF_IDENT_ANY)) - (((_a) == CF_IDENT_ANY) > ((_b) == CF_IDENT_ANY))
 
#define NULL_CMP(_a, _b)    (((_a) == NULL) < ((_b) == NULL)) - (((_a) == NULL) > ((_b) == NULL))
 

Functions

int8_t section_name_cmp (void const *one, void const *two)
 Compare two sections. More...
 

Detailed Description

Comparison functions for sections.

Id
3dc09eb3920cd55501f63eec6c53cfae9a99e061

Definition in file section.c.

Macro Definition Documentation

◆ IDENT_ANY_CMP

#define IDENT_ANY_CMP (   _a,
  _b 
)     (((_a) == CF_IDENT_ANY) < ((_b) == CF_IDENT_ANY)) - (((_a) == CF_IDENT_ANY) > ((_b) == CF_IDENT_ANY))

Definition at line 30 of file section.c.

◆ NULL_CMP

#define NULL_CMP (   _a,
  _b 
)     (((_a) == NULL) < ((_b) == NULL)) - (((_a) == NULL) > ((_b) == NULL))

Definition at line 33 of file section.c.

Function Documentation

◆ section_name_cmp()

int8_t section_name_cmp ( void const *  one,
void const *  two 
)

Compare two sections.

  • Sections are sorted by name1, then name2.
  • NULLs sort before non-NULLs.
  • CF_IDENT_ANY sort after non-CF_IDENT_ANY.
  • Any other comparisons are lexicographic.
Parameters
[in]oneFirst section name.
[in]twoSecond section name.
Returns
< 0 if one < two, 0 if one == two, > 0 if one > two.

Definition at line 48 of file section.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: