libubox
C utility functions for OpenWrt.
avl-cmp.h File Reference

Go to the source code of this file.

Functions

int avl_strcmp (const void *k1, const void *k2, void *ptr)
 
int avl_blobcmp (const void *k1, const void *k2, void *ptr)
 

Function Documentation

◆ avl_blobcmp()

int avl_blobcmp ( const void *  k1,
const void *  k2,
void *  ptr 
)

Definition at line 32 of file avl-cmp.c.

33 {
34  int len = _min(blob_raw_len(k1), blob_raw_len(k2));
35 
36  return memcmp(k1, k2, len);
37 }
static int _min(int v1, int v2)
Definition: avl-cmp.c:20
static size_t blob_raw_len(const struct blob_attr *attr)
Definition: blob.h:109
Here is the call graph for this function:

◆ avl_strcmp()

int avl_strcmp ( const void *  k1,
const void *  k2,
void *  ptr 
)

Definition at line 26 of file avl-cmp.c.

27 {
28  return strcmp(k1, k2);
29 }
Here is the caller graph for this function: