Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

int nl_data_cmp ( struct nl_data *  a,
struct nl_data *  b 
)

Compare two abstract data objects.

  • a Abstract data object.
  • b Another abstract data object.
    Returns:
    An integer less than, equal to, or greater than zero if a is found, respectively, to be less than, to match, or be greater than b.

Definition at line 174 of file data.c.

References nl_data_get(), and nl_data_get_size().

{
      void *a_ = nl_data_get(a);
      void *b_ = nl_data_get(b);

      if (a_ && b_)
            return memcmp(a_, b_, nl_data_get_size(a));
      else
            return -1;
}


Generated by  Doxygen 1.6.0   Back to index