[Pdbg] [PATCH 01/11] Cleanup exit code

Alistair Popple alistair at popple.id.au
Fri Jun 15 14:36:25 AEST 2018


Thanks Mikey, series applied.

- Alistair

On Thursday, 7 June 2018 4:54:28 PM AEST Michael Neuling wrote:
> 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;
>  }
> 




More information about the Pdbg mailing list