mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-25 19:04:57 -05:00
more tabbing fixes
This commit is contained in:
parent
14b50c163e
commit
1c25689ae6
1 changed files with 5 additions and 2 deletions
|
|
@ -148,7 +148,7 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
|
|||
isc_buffer_t *target)
|
||||
{
|
||||
dns_result_t result;
|
||||
unsigned int common_start, common_length, length, ntabs;
|
||||
unsigned int common_start, common_length, length, ntabs, offset;
|
||||
char *common;
|
||||
dns_rdata_t rdata;
|
||||
isc_boolean_t first = ISC_TRUE;
|
||||
|
|
@ -171,6 +171,7 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
|
|||
common = NULL;
|
||||
length = 0;
|
||||
ntabs = 0;
|
||||
offset = 0;
|
||||
|
||||
/*
|
||||
* XXX Explicit buffer structure references here. Improve buffer
|
||||
|
|
@ -195,6 +196,7 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
|
|||
common_length = target->used - common_start;
|
||||
common = (char *)target->base + common_start;
|
||||
ntabs = tabs_needed(common_length, 24);
|
||||
offset = common_length + ntabs * 8;
|
||||
isc_buffer_available(target, &r);
|
||||
if (r.length < ntabs)
|
||||
return (DNS_R_NOSPACE);
|
||||
|
|
@ -213,7 +215,8 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
|
|||
rdataset->class, rdataset->type,
|
||||
rdataset->ttl);
|
||||
INSIST(length <= sizeof classtypettl);
|
||||
ntabs = tabs_needed(common_length, 40);
|
||||
offset += length;
|
||||
ntabs = tabs_needed(offset, 40);
|
||||
isc_buffer_available(target, &r);
|
||||
if (r.length < length + ntabs)
|
||||
return (DNS_R_NOSPACE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue