From: Sven-Haegar Koch Date: Thu, 7 Aug 2014 21:01:05 +0000 (+0200) Subject: Fix exit code of "tinc get". X-Git-Tag: release-1.1pre11~55 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=9fe5ab7ccb60537810b60b76a415507ef2cadfdd;p=tinc 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. --- diff --git a/src/tincctl.c b/src/tincctl.c index c0c8a256..2a2c488e 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...