chiark / gitweb /
Get semantics of invertable options, and of cancelling, right.
[adns.git] / client / adh-opts.c
index e7704a1341ac8faf8c17d02227b4164acdee3477..ac1ad6915b595f82c614609e63ece99a3d1be2f4 100644 (file)
@@ -104,7 +104,7 @@ static const struct optioninfo perquery_options[]= {
   { ot_desconly, "asynchronous/pipe mode options:" },
   { ot_funcarg,          "Set <id>, default is decimal sequence starting 0",
     0, "asynch-id",        0,0, &of_asynch_id, "id" },
-  { ot_funcarg,          "Cancel the query with id <id>",
+  { ot_funcarg,          "Cancel the query with id <id> (no error if not found)",
     0, "cancel-id",        0,0, &of_cancel_id, "id" },
 
   { ot_end }
@@ -309,7 +309,7 @@ void opt_do(const struct optioninfo *oip, const char *arg, int invert) {
   switch (oip->type) {
   case ot_flag:
     assert(!arg);
-    *oip->storep= invert ? !oip->value : oip->value;
+    *oip->storep= !invert;
     return;
   case ot_value:
     assert(!arg);