chiark / gitweb /
Add a few assertions about *_LLEN in adns.c.
[chiark-tcl.git] / adns / adns.c
index 2a86f4aca2db743b928efb35778dc2467e90f56a..a21de019793630c466524fbcce689e4f22d4fc03 100644 (file)
@@ -524,6 +524,7 @@ static void make_resultstatus(Tcl_Interp *ip, adns_status status,
   results[1]= cht_ret_int(ip, status);
   results[2]= cht_ret_string(ip, adns_errabbrev(status));
   results[3]= cht_ret_string(ip, adns_strerror(status));
+  assert(RESULTSTATUS_LLEN==4);
 }
 
 static Tcl_Obj *make_resultrdata(Tcl_Interp *ip, adns_answer *answer) {
@@ -554,6 +555,7 @@ static void make_resultlist(Tcl_Interp *ip, adns_answer *answer,
   results[4]= cht_ret_string(ip, answer->owner);
   results[5]= cht_ret_string(ip, answer->cname ? answer->cname : "");
   results[6]= make_resultrdata(ip, answer);
+  assert(RESULTLIST_LLEN==7);
 }
 
 /*---------- synchronous query handling ----------*/