Bugfixes.
[adns] / src / internal.h
index 24e69a8..257953f 100644 (file)
@@ -239,7 +239,7 @@ void adns__diag(adns_state ads, int serv, adns_query qu,
                const char *fmt, ...) PRINTFFORMAT(4,5);
 
 int adns__vbuf_ensure(vbuf *vb, int want);
-int adns__vbuf_appendstr(vbuf *vb, const char *data);
+int adns__vbuf_appendstr(vbuf *vb, const char *data); /* does not include nul */
 int adns__vbuf_append(vbuf *vb, const byte *data, int len);
 /* 1=>success, 0=>realloc failed */
 void adns__vbuf_appendq(vbuf *vb, const byte *data, int len);
@@ -317,6 +317,9 @@ void *adns__alloc_interim(adns_query qu, size_t sz);
  *
  * _alloc_interim can fail, in which case it will fail the query too,
  * so nothing more need be done with it.
+ *
+ * adns__alloc_interim(qu,0) will not return 0, but it will not
+ * necessarily return a distinct pointer each time.
  */
 
 void *adns__alloc_mine(adns_query qu, size_t sz);
@@ -326,7 +329,7 @@ void *adns__alloc_mine(adns_query qu, size_t sz);
  */
 
 void *adns__alloc_final(adns_query qu, size_t sz);
-/* Cannot fail.
+/* Cannot fail, and cannot return 0.
  */
 
 void adns__makefinal_block(adns_query qu, void **blpp, size_t sz);