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

bool ldns_rr_list_cat ( ldns_rr_list left,
ldns_rr_list right 
)

concatenates two ldns_rr_lists together. This modifies *left (to extend it and add the pointers from *right).

Parameters:
[in] left the leftside
[in] right the rightside
Returns:
a left with right concatenated to it

Definition at line 767 of file rr.c.

References ldns_rr_list_cat(), ldns_rr_list_push_rr(), ldns_rr_list_rr(), and ldns_rr_list_rr_count().

Referenced by ldns_rr_list_cat(), and ldns_zone_push_rr_list().

{
      size_t r_rr_count;
      size_t l_rr_count;
      size_t i;

      if (left) {
            l_rr_count = ldns_rr_list_rr_count(left);
      } else {
            return false;
      }

      if (right) {
            r_rr_count = ldns_rr_list_rr_count(right);
      } else {
            r_rr_count = 0;
      }
      
      /* push right to left */
      for(i = 0; i < r_rr_count; i++) {
            ldns_rr_list_push_rr(left, ldns_rr_list_rr(right, i));
      }
      return true;
}


Generated by  Doxygen 1.6.0   Back to index