diff options
| author | Alistair Popple <alistair@popple.id.au> | 2016-12-02 11:19:42 +1100 |
|---|---|---|
| committer | Alistair Popple <alistair@popple.id.au> | 2016-12-02 11:19:42 +1100 |
| commit | f0cdaefbb6c44d74465dfcbfa79292ed9765fccc (patch) | |
| tree | bb53e1e05fd7adfaebe567d0424f400d210eaaae /src | |
| parent | cdfc8199b724bc2bb8dec3d2f5e63b35d7d68edf (diff) | |
| download | pdbg-f0cdaefbb6c44d74465dfcbfa79292ed9765fccc.tar.gz pdbg-f0cdaefbb6c44d74465dfcbfa79292ed9765fccc.zip | |
src/main.c: Make return codes consistent
Always return -1 when encountering an error and 0 for success.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -893,10 +893,12 @@ int main(int argc, char *argv[]) break; } - if (!rc) { + 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", argv[0]); - } + rc = -1; + } else + rc = 0; /* TODO: We don't properly tear down all the targets yet */ targets[0].destroy(&targets[0]); |

