[ldns-users] [PATCH 2/3] Miscellaneous API cleanup

Simon Vallet svallet at genoscope.cns.fr
Mon May 14 10:18:30 UTC 2007


this one adds some cleanups to the existing API, mostly to avoid
compiler warnings

Simon

Index: ldns/dname.h
===================================================================
--- ldns/dname.h	(revision 2344)
+++ ldns/dname.h	(working copy)
@@ -74,7 +74,7 @@
  * \param[in] d the dname to chop
  * \return the remaining dname
  */
-ldns_rdf *ldns_dname_left_chop(ldns_rdf *d);
+ldns_rdf *ldns_dname_left_chop(const ldns_rdf *d);
 
 /**
  * count the number of labels inside a LDNS_RDF_DNAME type rdf.
Index: dname.c
===================================================================
--- dname.c	(revision 2344)
+++ dname.c	(working copy)
@@ -116,7 +116,7 @@
 }
 
 ldns_rdf *
-ldns_dname_left_chop(ldns_rdf *d)
+ldns_dname_left_chop(const ldns_rdf *d)
 {
 	uint8_t label_pos;
 	ldns_rdf *chop;
Index: ldns/rr.h
===================================================================
--- ldns/rr.h	(revision 2344)
+++ ldns/rr.h	(working copy)
@@ -593,7 +593,7 @@
  * \param[in] rr the rr to check
  * \return true if rr_list contains rr, false otherwise
  */
-bool ldns_rr_list_contains_rr(ldns_rr_list *rr_list, ldns_rr *rr); 
+bool ldns_rr_list_contains_rr(const ldns_rr_list *rr_list, ldns_rr *rr); 
 
 /**
  * checks if an rr_list is a rrset.
Index: rr.c
===================================================================
--- rr.c	(revision 2344)
+++ rr.c	(working copy)
@@ -965,7 +965,7 @@
 
 
 bool
-ldns_rr_list_contains_rr(ldns_rr_list *rr_list, ldns_rr *rr)
+ldns_rr_list_contains_rr(const ldns_rr_list *rr_list, ldns_rr *rr)
 {
 	size_t i;
 	





More information about the ldns-users mailing list