Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
e29c2b39
Commit
e29c2b39
authored
Mar 06, 2014
by
Evan Hunt
Browse files
[master] fix misuses of isc__buffer functions, update comment
parent
def81722
Changes
5
Hide whitespace changes
Inline
Side-by-side
bin/named/query.c
View file @
e29c2b39
...
...
@@ -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
,
...
...
bin/nsupdate/nsupdate.c
View file @
e29c2b39
...
...
@@ -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
,
/*(*/
")"
);
}
}
...
...
bin/tools/isc-hmac-fixup.c
View file @
e29c2b39
...
...
@@ -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"
))
{
...
...
lib/dns/rpz.c
View file @
e29c2b39
...
...
@@ -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
);
}
...
...
lib/isc/include/isc/buffer.h
View file @
e29c2b39
...
...
@@ -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_buf
f
er_
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment