From 9fe5ab7ccb60537810b60b76a415507ef2cadfdd Mon Sep 17 00:00:00 2001 From: Sven-Haegar Koch Date: Thu, 7 Aug 2014 23:01:05 +0200 Subject: [PATCH] Fix exit code of "tinc get". Successfully getting an existing variable ("tinc get name") should not result in an error exitcode (1) from the tinc command. This changes the result of test/commandline.test from FAIL to PASS. --- src/tincctl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tincctl.c b/src/tincctl.c index c0c8a25..2a2c488 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1635,9 +1635,12 @@ static int cmd_config(int argc, char *argv[]) { } if(action < -1) { - if(!found) + if(found) { + return 0; + } else { fprintf(stderr, "No matching configuration variables found.\n"); - return 1; + return 1; + } } // Make sure we wrote everything... -- 2.25.1