From: Christian Hofstaedtler Date: Wed, 28 Aug 2013 19:12:08 +0000 (+0200) Subject: Fix zone2{sql,json} exit codes X-Git-Tag: rec-3.6.0-rc1~480^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F979%2Fhead;p=thirdparty%2Fpdns.git Fix zone2{sql,json} exit codes To be consistent with general practice, fix zone2{sql,json} to exit with: * 0 on success * 1 on error This also moves the catch block after the last line of main, so a "theoretically" possible exception in ::arg().mustDo would get caught. (Also, one level less of indent!) --- diff --git a/pdns/backends/bind/zone2json.cc b/pdns/backends/bind/zone2json.cc index 3b8488b581..fda60801df 100644 --- a/pdns/backends/bind/zone2json.cc +++ b/pdns/backends/bind/zone2json.cc @@ -122,10 +122,10 @@ ArgvMap &arg() int main(int argc, char **argv) +try { vector lines; - try { reportAllTypes(); reportFancyTypes(); #if __GNUC__ >= 3 @@ -232,21 +232,19 @@ int main(int argc, char **argv) num_domainsdone=1; } cerr<= 3 @@ -379,26 +379,23 @@ int main(int argc, char **argv) } cerr<