diff --git a/bin/tests/rdata_test.c b/bin/tests/rdata_test.c index a8ad41b8ab..01351fad37 100644 --- a/bin/tests/rdata_test.c +++ b/bin/tests/rdata_test.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata_test.c,v 1.48.332.2 2011/08/16 23:45:14 tbox Exp $ */ +/* $Id: rdata_test.c,v 1.48.332.3 2011/08/28 09:16:12 marka Exp $ */ #include @@ -973,6 +973,15 @@ main(int argc, char *argv[]) { type = token.value.as_ulong; isc_buffer_init(&tbuf, outbuf, sizeof(outbuf)); result = dns_rdatatype_totext(type, &tbuf); + if (result != ISC_R_SUCCESS) { + fprintf(stdout, + "dns_rdatatype_totext " + "returned %s(%d)\n", + dns_result_totext(result), result); + fflush(stdout); + need_eol = 1; + continue; + } fprintf(stdout, "type = %.*s(%d)\n", (int)tbuf.used, (char*)tbuf.base, type); } else if (token.type == isc_tokentype_string) { @@ -1005,6 +1014,14 @@ main(int argc, char *argv[]) { class = token.value.as_ulong; isc_buffer_init(&tbuf, outbuf, sizeof(outbuf)); result = dns_rdatatype_totext(class, &tbuf); + if (result != ISC_R_SUCCESS) { + fprintf(stdout, "dns_rdatatype_totext " + "returned %s(%d)\n", + dns_result_totext(result), result); + fflush(stdout); + need_eol = 1; + continue; + } fprintf(stdout, "class = %.*s(%d)\n", (int)tbuf.used, (char*)tbuf.base, class); } else if (token.type == isc_tokentype_string) {