Commit a10d5a5c authored by Daniel Salzman's avatar Daniel Salzman

kdig: fix return code if no action specified (version, help)

parent b2583ca0
......@@ -1139,7 +1139,7 @@ int kdig_exec(const kdig_params_t *params)
return KNOT_EINVAL;
}
bool success = false;
bool success = true;
// Loop over query list.
WALK_LIST(n, params->queries) {
......@@ -1163,9 +1163,9 @@ int kdig_exec(const kdig_params_t *params)
break;
}
// At least one operation must succeed.
if (ret == 0) {
success = true;
// All operations must succeed.
if (ret != 0) {
success = false;
}
// If not last query, print separation.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment