Repository : ssh://git@open-mesh.org/batctl
On branch : next
commit 1932d4e4d9de997856209e9ef9013dbbdaa40848 Author: Moritz Warning moritzwarning@web.de Date: Wed Dec 5 09:40:10 2012 +0100
batctl: indicate successful termination when -h is used
The return value of batctl -h indicates failure while it should indicate a successful execution.
Signed-off-by: Moritz Warning moritzwarning@web.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
1932d4e4d9de997856209e9ef9013dbbdaa40848 main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c index 0a979bd..ea83bbf 100644 --- a/main.c +++ b/main.c @@ -114,8 +114,10 @@ int main(int argc, char **argv) goto err; }
- if (strcmp(argv[1], "-h") == 0) - goto err; + if (strcmp(argv[1], "-h") == 0) { + print_usage(); + exit(EXIT_SUCCESS); + }
if (strcmp(argv[1], "-v") == 0) { printf("batctl %s [batman-adv: ", SOURCE_VERSION);