X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=a986af7633e69d9e7cf28b3d6956e9841e1335bd;hb=41583d5dcfc1277b1a203478de4cce2cd0cda1b1;hp=6e7965c291b4ff95f62575cd442ac1e9ad918216;hpb=f0e11cd2c55a83662049646d2f6ffba3ac697989;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index 6e7965c2..a986af76 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1606,7 +1606,7 @@ static int cmd_config(int argc, char *argv[]) { if(action < 0 && !removed) { remove(tmpfile); fprintf(stderr, "No configuration variables deleted.\n"); - return *value; + return *value != 0; } // Replace the configuration file with the new one @@ -1739,7 +1739,7 @@ static int cmd_init(int argc, char *argv[]) { return 1; } - if(strcmp(confdir, confbase) && mkdir(confdir, 0755) && errno != EEXIST) { + if(!confbase_given && mkdir(confdir, 0755) && errno != EEXIST) { fprintf(stderr, "Could not create directory %s: %s\n", confdir, strerror(errno)); return 1; }