]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] fix misuses of isc__buffer functions, update comment
authorEvan Hunt <each@isc.org>
Fri, 7 Mar 2014 01:21:19 +0000 (17:21 -0800)
committerEvan Hunt <each@isc.org>
Fri, 7 Mar 2014 01:26:21 +0000 (17:26 -0800)
bin/named/query.c
bin/nsupdate/nsupdate.c
bin/tools/isc-hmac-fixup.c
lib/dns/rpz.c
lib/isc/include/isc/buffer.h

index 5ea95157edcb1e15e7a1aa4969f39dc71912c2a1..2fc7d334ecc6e83e9b63d96ecc8b0a1000cbed9b 100644 (file)
@@ -2301,7 +2301,7 @@ query_dns64(ns_client_t *client, dns_name_t **namep, dns_rdataset_t *rdataset,
                     dns64 != NULL; dns64 = dns_dns64_next(dns64)) {
 
                        dns_rdataset_current(rdataset, &rdata);
-                       isc__buffer_availableregion(buffer, &r);
+                       isc_buffer_availableregion(buffer, &r);
                        INSIST(r.length >= 16);
                        result = dns_dns64_aaaafroma(dns64, &netaddr,
                                                     client->signer,
index d534cff96673ce64a8f1e9a4d95d343db539f2fa..c7cd28627fceaee8af3a0cbf64972f52a17b05db 100644 (file)
@@ -2135,12 +2135,12 @@ check_tsig_error(dns_rdataset_t *rdataset, isc_buffer_t *b) {
        if (tsig.error != 0) {
                if (isc_buffer_remaininglength(b) < 1)
                      check_result(ISC_R_NOSPACE, "isc_buffer_remaininglength");
-               isc__buffer_putstr(b, "(" /*)*/);
+               isc_buffer_putstr(b, "(" /*)*/);
                result = dns_tsigrcode_totext(tsig.error, b);
                check_result(result, "dns_tsigrcode_totext");
                if (isc_buffer_remaininglength(b) < 1)
                      check_result(ISC_R_NOSPACE, "isc_buffer_remaininglength");
-               isc__buffer_putstr(b,  /*(*/ ")");
+               isc_buffer_putstr(b,  /*(*/ ")");
        }
 }
 
index daf391a81cd68c8e3f5d55ea7cacbacc0d8da37e..ff77be7b4247cdd3857df31d9d42a7f0ba59e1d5 100644 (file)
@@ -52,7 +52,7 @@ main(int argc, char **argv)  {
                fprintf(stderr, "error: %s\n", isc_result_totext(result));
                return (1);
        }
-       isc__buffer_usedregion(&buf, &r);
+       isc_buffer_usedregion(&buf, &r);
 
        if (!strcasecmp(argv[1], "md5") ||
            !strcasecmp(argv[1], "hmac-md5")) {
index ac2d086974b1206949b8077d8de45953dd4d395e..5f4078e277de31e433bf27770636a3b6f31bf9eb 100644 (file)
@@ -582,8 +582,8 @@ ip2name(const dns_rpz_cidr_key_t *tgt_ip, dns_rpz_prefix_t tgt_prefix,
                }
        }
 
-       isc__buffer_init(&buffer, str, sizeof(str));
-       isc__buffer_add(&buffer, len);
+       isc_buffer_init(&buffer, str, sizeof(str));
+       isc_buffer_add(&buffer, len);
        result = dns_name_fromtext(ip_name, &buffer, base_name, 0, NULL);
        return (result);
 }
index 5aff01c2479095a80e9dfdbc0930d54d31b30890..f9c0775790e72eba8bf09d6858890e1f6aa613a4 100644 (file)
@@ -664,12 +664,12 @@ ISC_LANG_ENDDECLS
 
 /*! \note
  * XXXDCL Something more could be done with initializing buffers that
- * point to const data.  For example, a new function, isc_buffer_initconst,
- * could be used, and a new boolean flag in the buffer structure could
- * indicate whether the buffer was initialized with that function.
- * (isc_bufer_init itself would be reprototyped to *not* have its "base"
- * parameter be const.)  Then if the boolean were true, the isc_buffer_put*
- * functions could assert a contractual requirement for a non-const buffer.
+ * point to const data.  For example, isc_buffer_constinit() could
+ * set a new boolean flag in the buffer structure indicating whether
+ * the buffer was initialized with that function.  * Then if the
+ * boolean were true, the isc_buffer_put* functions could assert a
+ * contractual requirement for a non-const buffer.
+ *
  * One drawback is that the isc_buffer_* functions (macros) that return
  * pointers would still need to return non-const pointers to avoid compiler
  * warnings, so it would be up to code that uses them to have to deal