3437. [bug] isc_buffer_init -> isc_buffer_constinit to initialise
buffers with constant data. [RT #32064] Squashed commit of the following: commit 3433b96bf11f8c90ccbe412f01d02a6d8bbc2d33 Author: Mark Andrews <marka@isc.org> Date: Sat Dec 8 12:41:16 2012 +1100 isc_buffer_init -> isc_buffer_constinit commit c22dbcc1122a0a44f7b46068e0ccbc25353a57d5 Author: Mark Andrews <marka@isc.org> Date: Sat Dec 8 12:38:39 2012 +1100 isc_buffer_init -> isc_buffer_constinit commit 900820416c45c1887d0d22d7a010df60a903bd56 Author: Mark Andrews <marka@isc.org> Date: Sat Dec 8 12:24:19 2012 +1100 remove isc_buffer_reconstinit commit f815711c17b05f9961786a90b9bae902d3c01494 Author: Mark Andrews <marka@isc.org> Date: Wed Dec 5 15:42:57 2012 +1100 add isc_buffer_constinit
This commit is contained in:
@@ -54,7 +54,7 @@ use(dst_key_t *key, isc_mem_t *mctx) {
|
||||
*/
|
||||
isc_buffer_add(&sigbuf, 1);
|
||||
|
||||
isc_buffer_init(&databuf, data, strlen(data));
|
||||
isc_buffer_constinit(&databuf, data, strlen(data));
|
||||
isc_buffer_add(&databuf, strlen(data));
|
||||
isc_buffer_usedregion(&databuf, &datareg);
|
||||
|
||||
@@ -262,7 +262,7 @@ main(void) {
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
isc_buffer_init(&b, "test.", 5);
|
||||
isc_buffer_constinit(&b, "test.", 5);
|
||||
isc_buffer_add(&b, 5);
|
||||
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
@@ -274,7 +274,7 @@ main(void) {
|
||||
io(name, 49667, DST_ALG_DSA, DST_TYPE_PRIVATE|DST_TYPE_PUBLIC, mctx);
|
||||
io(name, 2, DST_ALG_RSAMD5, DST_TYPE_PRIVATE|DST_TYPE_PUBLIC, mctx);
|
||||
|
||||
isc_buffer_init(&b, "dh.", 3);
|
||||
isc_buffer_constinit(&b, "dh.", 3);
|
||||
isc_buffer_add(&b, 3);
|
||||
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user