[Pdbg] [PATCH 01/11] Cleanup exit code
Michael Neuling
mikey at neuling.org
Thu Jun 7 16:54:28 AEST 2018
Signed-off-by: Michael Neuling <mikey at neuling.org>
---
src/main.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/main.c b/src/main.c
index 85770ef78c..26e141076e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -622,16 +622,11 @@ int main(int argc, char *argv[])
return 1;
found_action:
- if (rc <= 0) {
- printf("No valid targets found or specified. Try adding -p/-c/-t options to specify a target.\n");
- printf("Alternatively run '%s -a probe' to get a list of all valid targets\n",
- basename(argv[0]));
- rc = 1;
- } else
- rc = 0;
+ if (rc > 0)
+ return 0;
- //if (backend == FSI)
- //fsi_destroy(NULL);
-
- return rc;
+ printf("No valid targets found or specified. Try adding -p/-c/-t options to specify a target.\n");
+ printf("Alternatively run '%s -a probe' to get a list of all valid targets\n",
+ basename(argv[0]));
+ return 1;
}
--
2.17.0
More information about the Pdbg
mailing list