From ea72ae09ffb66ae5ed152c909a371b8a789b52c8 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 2 Oct 2003 02:59:58 +0000 Subject: [PATCH] print out zone if set --- bin/tests/inter_test.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/tests/inter_test.c b/bin/tests/inter_test.c index 78edaab48e..a2a50d126c 100644 --- a/bin/tests/inter_test.c +++ b/bin/tests/inter_test.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: inter_test.c,v 1.8 2001/01/09 21:41:09 bwelling Exp $ */ +/* $Id: inter_test.c,v 1.9 2003/10/02 02:59:58 marka Exp $ */ #include @@ -54,7 +54,13 @@ main(int argc, char **argv) { INSIST(ifdata.af == AF_INET || ifdata.af == AF_INET6); res = inet_ntop(ifdata.af, &ifdata.address.type, buf, sizeof(buf)); - fprintf(stdout, "address = %s\n", res == NULL ? "BAD" : res); + if (ifdata.address.zone != 0) + fprintf(stdout, "address = %s (zone %u)\n", + res == NULL ? "BAD" : res, + ifdata.address.zone); + else + fprintf(stdout, "address = %s\n", + res == NULL ? "BAD" : res); INSIST(ifdata.address.family == ifdata.af); res = inet_ntop(ifdata.af, &ifdata.netmask.type, buf, sizeof(buf));