batctl: avoid error message when command was successful

Message ID 1302708420-8552-1-git-send-email-lindner_marek@yahoo.de (mailing list archive)
State Accepted, archived
Commit eee3fc647349f8a0d2b671eed2f0e7375ac113d4
Headers

Commit Message

Marek Lindner April 13, 2011, 3:27 p.m. UTC
  Reported-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
 sys.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Sven Eckelmann April 16, 2011, 8:04 a.m. UTC | #1
Marek Lindner wrote:
> Reported-by: Linus Lüssing <linus.luessing@web.de>
> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>

Acked-by: Sven Eckelmann <sven@narfation.org>
  
Simon Wunderlich April 17, 2011, 4:22 p.m. UTC | #2
Applied in eee3fc6,

thanks
	Simon

On Wed, Apr 13, 2011 at 05:27:00PM +0200, Marek Lindner wrote:
> Reported-by: Linus Lüssing <linus.luessing@web.de>
> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
> ---
>  sys.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sys.c b/sys.c
> index 729f898..3511b40 100644
> --- a/sys.c
> +++ b/sys.c
> @@ -420,10 +420,10 @@ int handle_gw_setting(char *mesh_iface, int argc, char **argv)
>  	case GW_MODE_SERVER:
>  		res = write_file(path_buff, SYS_GW_BW, argv[2], NULL);
>  		break;
> -	default:
> -		goto out;
>  	}
>  
> +	goto out;
> +
>  opt_err:
>  	printf("Error - the supplied argument is invalid: %s\n", argv[1]);
>  	printf("The following values are allowed:\n");
> -- 
> 1.7.2.3
> 
>
  

Patch

diff --git a/sys.c b/sys.c
index 729f898..3511b40 100644
--- a/sys.c
+++ b/sys.c
@@ -420,10 +420,10 @@  int handle_gw_setting(char *mesh_iface, int argc, char **argv)
 	case GW_MODE_SERVER:
 		res = write_file(path_buff, SYS_GW_BW, argv[2], NULL);
 		break;
-	default:
-		goto out;
 	}
 
+	goto out;
+
 opt_err:
 	printf("Error - the supplied argument is invalid: %s\n", argv[1]);
 	printf("The following values are allowed:\n");