diff options
author | LaMont Jones <lamont@debian.org> | 2009-03-20 18:40:55 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2009-03-20 18:40:55 -0600 |
commit | 84e6ec609bc40abd57388eeb39ccf4727c210498 (patch) | |
tree | d292ee4a33d8c639a7aa4f4e5ce068377e6702a5 /bin/tests/cfg_test.c | |
parent | 45b41449108ec791ffc94fc779231e1af17be0d2 (diff) | |
download | bind9-84e6ec609bc40abd57388eeb39ccf4727c210498.tar.gz |
9.6.1b1
Diffstat (limited to 'bin/tests/cfg_test.c')
-rw-r--r-- | bin/tests/cfg_test.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/tests/cfg_test.c b/bin/tests/cfg_test.c index 77c9712c..48febad8 100644 --- a/bin/tests/cfg_test.c +++ b/bin/tests/cfg_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001, 2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cfg_test.c,v 1.19 2007/06/19 23:46:59 tbox Exp $ */ +/* $Id: cfg_test.c,v 1.19.332.2 2009/03/02 23:47:11 tbox Exp $ */ /*! \file */ @@ -70,7 +70,7 @@ main(int argc, char **argv) { cfg_obj_t *cfg = NULL; cfg_type_t *type = NULL; isc_boolean_t grammar = ISC_FALSE; - isc_boolean_t memstats = ISC_FALSE; + isc_boolean_t memstats = ISC_FALSE; char *filename = NULL; RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS); @@ -116,7 +116,7 @@ main(int argc, char **argv) { } else { filename = argv[1]; } - argv++, argc--; + argv++, argc--; } if (grammar) { @@ -147,5 +147,10 @@ main(int argc, char **argv) { isc_mem_stats(mctx, stderr); isc_mem_destroy(&mctx); - return (0); + fflush(stdout); + if (ferror(stdout)) { + fprintf(stderr, "write error\n"); + return (1); + } else + return (0); } |