mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
print_name() formatted text into a buffer of 256
character pointers, not 256 characters; also changed it to use dns_name_format()
This commit is contained in:
parent
87ab7fb07d
commit
b6dcb3d243
@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rbt_test.c,v 1.32 2000/07/21 21:02:15 gson Exp $ */
|
||||
/* $Id: rbt_test.c,v 1.33 2000/07/21 21:13:40 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -93,17 +93,9 @@ delete_name(void *data, void *arg) {
|
||||
|
||||
static void
|
||||
print_name(dns_name_t *name) {
|
||||
isc_buffer_t target;
|
||||
char *buffer[256];
|
||||
|
||||
isc_buffer_init(&target, buffer, sizeof(buffer));
|
||||
|
||||
/*
|
||||
* ISC_FALSE means absolute names have the final dot added.
|
||||
*/
|
||||
dns_name_totext(name, ISC_FALSE, &target);
|
||||
|
||||
printf("%.*s", (int)target.used, (char *)target.base);
|
||||
char buffer[1024];
|
||||
dns_name_format(name, buffer, sizeof(buffer));
|
||||
printf("%s", buffer);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user