Mercurial > hg > dmlib
diff tools/dumpmod.c @ 2565:d56a0e86067a
Improve error handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 28 Feb 2022 11:49:58 +0200 |
parents | aacf3bd1cceb |
children | 9807ae37ad69 |
line wrap: on
line diff
--- a/tools/dumpmod.c Mon Feb 28 10:18:38 2022 +0200 +++ b/tools/dumpmod.c Mon Feb 28 11:49:58 2022 +0200 @@ -434,10 +434,7 @@ // Parse arguments if (!dmArgsProcess(argc, argv, optList, optListN, argHandleOpt, argHandleFile, OPTH_BAILOUT)) - { - res = 1; - goto exit; - } + goto out; // Initialize miniJSS jssInit(); @@ -454,7 +451,7 @@ res = dmError(DMERR_FOPEN, "Error opening input file '%s': %s\n", optFilename, dmErrorStr(res)); - goto exit; + goto out; } // Read module file @@ -497,7 +494,7 @@ { res = dmError(DMERR_INIT_FAIL, "Could not load module file.\n"); - goto exit; + goto out; } // Print out information @@ -542,7 +539,7 @@ } } -exit: +out: // Free module data jssFreeModule(mod); jssClose();